1
0
mirror of https://github.com/php/doc-en.git synced 2026-03-24 07:42:10 +01:00

117 Commits

Author SHA1 Message Date
Andrew
2832df2e1b Rephrased advice in Heredoc string example 6 (#4704) 2025-06-03 13:52:27 -05:00
Derick Rethans
e587d0655e Enable WASM for language.types, and tweak examples 2025-04-09 17:47:37 +01:00
nyan-dot
ef5a00895d Fix incorrect description of output (#4310) 2024-12-16 23:00:16 +01:00
Mikhail Alferov
887c21f977 Add <literal> tag for double-quotes character (#3842) 2024-10-06 21:48:06 +01:00
Mikhail Alferov
ebc071c191 Fix example code (#3825)
* Update string.xml Fix the code example

There is no index 4 in the array, which has an index 3, maybe it was meant $arr[3][2]:

`Array
(
    [0] => 1
    [1] => 2
    [2] => 3
    [3] => Array
        (
            [0] => 41
            [1] => 42
            [2] => 43
        )

    [key] => Индексное значение
    [const-key] => Ключ со знаком минуса
    [foo] => Array
        (
            [0] => foo1
            [1] => foo2
            [2] => foo3
        )

)`

* Update string.xml Add missing semicolons and change $arr['foo'] idx
2024-10-03 13:05:58 +01:00
Gina Peter Banyard
b012e0dd83 Rewrite and flesh out string interpolation docs (#2000)
* Rewrite and flesh out string interpolation docs

This covers the PHP 8.2.0 deprecation of interpolation
It also renames simple to basic and complex to advanced, as those don't make a judgement on complexity

* Remove variable variable examples, add more examples, review comments

* Change ID for basic/advanced string interpolation

* Define the formal syntax and remove clunky wording

* Re-add example for bug 81635 fix
2024-10-02 16:53:46 +01:00
MorganLOCode
affa37e16f Update constant fallback behaviour which does not exist anymore (#3242)
Updating commentary to reflect changes made in 8.0 (undefined constants are no second-guessed as string literals).
2024-03-07 14:41:04 +00:00
Mikhail Alferov
d913c15e0c Fix example in string type description: missing EOL concatenation (#3131) 2024-01-22 02:00:01 +00:00
Osvaldo Dias dos Santos
20b53a5992 [skip-revcheck] Improve sentence grammar (#2898)
Remove an unnecessary word.
2023-10-31 12:30:45 +00:00
boxcleverliam
3a13ca3690 Update descriptions of octal, hex and Unicode escape sequences (#2793)
Clarify which part of each sequence is the regular expression by repeating it in the description, and give examples of each. Before this change, the curly braces are confusing due to having two different meanings in these sequences.
2023-09-26 04:34:24 +01:00
Eddie Kohler
48e35e9d0d Update string.xml to remove old string interpolation (#2712)
An example used the deprecated `${varname}` syntax; fix it.
2023-08-26 12:40:09 -04:00
Osvaldo Dias dos Santos
8e1ff07165 Improve wording about (Here|Now)doc delimiter tag (#2360)
Co-authored-by: George Peter Banyard <girgias@php.net>
2023-07-26 17:01:22 +01:00
Osvaldo Dias dos Santos
2e12177298 Add "a" to sentence (#2359) 2023-03-16 22:12:25 +00:00
winstonDeGreef
ea64803aa2 Clarify misleading description
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
Co-authored-by: Larry Garfield <larry@garfieldtech.com>

Closes GH-1693.
2023-01-18 17:41:40 +01:00
George Peter Banyard
161dde4fe7 Rewrite type section (#1726)
This commit rewrites the whole type section to (hopefully) be better structured and future proof for further additions to the type system.

* Each type now gets their individual page instead of being shoved in the type declaration page.

* A type system page is added which describes PHP's type system, regardless if it is possible to declare the type in userland or not. Therefore, the type declaration page only has information related to writing type declarations in userland.

* The description of strict_type and the type coercion is moved into the type juggling page.

* Remove outdated information in string implementation section

* Add paragraph about using non string in string context can throw

Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
2022-11-30 15:39:41 +00:00
winstonDeGreef
adc5148ee0 Fix small grammar mistake
Closes GH-1694.
2022-07-14 13:24:23 +02:00
Christoph M. Becker
59244d9ae9 Fix #81635: No example of complex interpolation syntax with filenames 2021-11-18 15:18:17 +01:00
Yoshinari Takaoka
2513f792fc Document Flexible heredoc/nowdoc. (#829)
Document Flexible heredoc/nowdoc.

Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
2021-08-09 00:39:46 +09:00
Dan Brown
35af8187d0 Updated string & array curly brace access with support notice (#546)
The documentation still states that array/string curly brace access
is possible but this was deprecated as of PHP 7.4 as per this RFC:
https://wiki.php.net/rfc/deprecate_curly_braces_array_access
and no longer supported as of PHP 8.
2021-04-26 13:24:09 +02:00
George Peter Banyard
d494ffa4d9 Add a page about numeric strings
Closes GH-215

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@351700 c90b9560-bf6c-de11-be94-00142212c4b1
2020-11-27 15:56:30 +00:00
Christoph Michael Becker
86e6094e86 Use canonical type names
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@351133 c90b9560-bf6c-de11-be94-00142212c4b1
2020-11-02 15:39:04 +00:00
George Peter Banyard
cdaea04215 Remove mention of PHP 5 in Language Reference section
This does not cover the OOP nor Error sections, but everything else should be covered

Closes GH-156

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@351112 c90b9560-bf6c-de11-be94-00142212c4b1
2020-10-31 19:13:58 +00:00
George Peter Banyard
417eda23c6 Removing mention of WDDX as it's been deprecated.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@347511 c90b9560-bf6c-de11-be94-00142212c4b1
2019-05-29 15:38:39 +00:00
Christoph Michael Becker
b234cd852d Add opening PHP tag
Patch provided by Csirmaz Bendegúz.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@346852 c90b9560-bf6c-de11-be94-00142212c4b1
2019-02-18 12:03:39 +00:00
Christoph Michael Becker
8c7cec965e Merged revision(s) 346849 from phpdoc/en/trunk/language/types/string.xml:
Add opening PHP tag

Patch provided by Csirmaz Bendegúz.
........


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@346851 c90b9560-bf6c-de11-be94-00142212c4b1
2019-02-18 12:00:46 +00:00
Christoph Michael Becker
fd5464bb1c Add opening PHP tag
Patch provided by Csirmaz Bendegúz.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@346849 c90b9560-bf6c-de11-be94-00142212c4b1
2019-02-18 09:23:06 +00:00
Tyson Andre
578f5f3744 fix typos in language reference
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@346847 c90b9560-bf6c-de11-be94-00142212c4b1
2019-02-18 05:16:33 +00:00
Christoph Michael Becker
d371c0ab53 Nowdocs treats backslashes literally
This integrates user note 123533.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@346613 c90b9560-bf6c-de11-be94-00142212c4b1
2019-01-21 11:01:23 +00:00
Christoph Michael Becker
0c78bb07f5 Fix error level
Cf. <https://3v4l.org/P2iuQ>.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@346031 c90b9560-bf6c-de11-be94-00142212c4b1
2018-11-22 18:10:01 +00:00
Christoph Michael Becker
9cc4767b2d What's in a name?
The Macintosh operating systems changed their name a few times since
version 10. We follow suite, and use the proper name whenever we refer
to a certain version, and use “macOS” as generic term, since “Mac OS X”
and “OS X” versions are already unsupported, or loose support at the end
of this year.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@345139 c90b9560-bf6c-de11-be94-00142212c4b1
2018-06-15 11:50:40 +00:00
Christoph Michael Becker
fb9b5ebe0e Don't refer to removed or obsolete extensions
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@344618 c90b9560-bf6c-de11-be94-00142212c4b1
2018-04-04 15:09:29 +00:00
Joe Watkins
f84c11fb10 reword empty string operator warning for clarity
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@343719 c90b9560-bf6c-de11-be94-00142212c4b1
2017-12-30 07:12:01 +00:00
Christoph Michael Becker
a61987978d Fix #75104: yet another old-style constructor
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@342905 c90b9560-bf6c-de11-be94-00142212c4b1
2017-08-22 12:46:23 +00:00
Christoph Michael Becker
f3341279fd Fix #75104: Example 3 Heredoc string quoting example
Since the manual doesn't apply to PHP 4 anymore, there is no need
to use old-style constructors in general examples.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@342904 c90b9560-bf6c-de11-be94-00142212c4b1
2017-08-22 10:06:18 +00:00
Jean-Sebastien Hedde
e4bf37c420 Replaced an example of negative indices in arrays with an example of negative indices in strings for the page on the String type.
-- 
Provided by anonymous 83124 ()

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@342556 c90b9560-bf6c-de11-be94-00142212c4b1
2017-06-07 11:58:15 +00:00
Andrey Gromov
d820976d6d Typos. From "files in progress"
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@342440 c90b9560-bf6c-de11-be94-00142212c4b1
2017-04-30 07:08:06 +00:00
Maciej Sobaczewski
95bdd6883b Another round of PHP 4 content removal (mostly inline mentions)
Review is welcome

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@341282 c90b9560-bf6c-de11-be94-00142212c4b1
2016-12-05 10:17:07 +00:00
Christoph Michael Becker
b7e2253079 Document support for negative indices in simple variable parsing syntax
Cf. <https://github.com/php/php-src/pull/2144>.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@340479 c90b9560-bf6c-de11-be94-00142212c4b1
2016-10-14 12:42:37 +00:00
Christoph Michael Becker
1b08ec49bf Fix broken invalid example
We also add a valid example, as suggested by Andrey Gromov.
Furthermore we move the unrelated paragraph below the examples.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@340379 c90b9560-bf6c-de11-be94-00142212c4b1
2016-10-08 09:49:02 +00:00
Christoph Michael Becker
59ea89792d There is no 2**31 byte restriction regarding the string length anymore for 64-bit
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@340324 c90b9560-bf6c-de11-be94-00142212c4b1
2016-10-05 14:22:23 +00:00
Christoph Michael Becker
3ec69d212d Fix broken example
Heredoc terminators must not be indented. Pointed out by rjhdby.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@340223 c90b9560-bf6c-de11-be94-00142212c4b1
2016-09-28 12:36:54 +00:00
Christoph Michael Becker
d225d89995 Update manual wrt. <https://wiki.php.net/rfc/negative-string-offsets>
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@340032 c90b9560-bf6c-de11-be94-00142212c4b1
2016-09-14 11:53:33 +00:00
Christoph Michael Becker
68199788a9 Fix docs wrt. bug #71572
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@340031 c90b9560-bf6c-de11-be94-00142212c4b1
2016-09-14 11:10:13 +00:00
Christoph Michael Becker
1b5a19a7b4 Fix #72430: [] operator not supported for strings
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@340030 c90b9560-bf6c-de11-be94-00142212c4b1
2016-09-14 10:56:07 +00:00
Christoph Michael Becker
0b626f05d2 Improve fix of #69234 as suggested by salathe
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@339475 c90b9560-bf6c-de11-be94-00142212c4b1
2016-06-24 10:25:58 +00:00
Christoph Michael Becker
49cdb0085e Fix #69234: Escaped single quotes within double quotes not recognized
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@339469 c90b9560-bf6c-de11-be94-00142212c4b1
2016-06-23 23:57:55 +00:00
Christoph Michael Becker
eeb2bef9bb Fix #53614: Strings variable parsing - problematic example among complex syntax examples
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@339345 c90b9560-bf6c-de11-be94-00142212c4b1
2016-06-14 13:42:53 +00:00
Christoph Michael Becker
bb3e737c4d documented silent overflow of octal literals in interpolated strings
see <https://wiki.php.net/rfc/octal.overload-checking>

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@339098 c90b9560-bf6c-de11-be94-00142212c4b1
2016-04-26 09:46:25 +00:00
Peter Cowburn
f1cc27e4a8 unicode escape sequence allows uppercase and any number of digits (doc bug #71746)
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@338989 c90b9560-bf6c-de11-be94-00142212c4b1
2016-04-11 07:59:29 +00:00
Christoph Michael Becker
27c99098ed fixed #71878 (Error in documentation example)
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@338787 c90b9560-bf6c-de11-be94-00142212c4b1
2016-03-23 11:14:14 +00:00