1
0
mirror of https://github.com/php/doc-en.git synced 2026-04-25 08:18:10 +02:00
Commit Graph

103 Commits

Author SHA1 Message Date
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
Christoph Michael Becker 78291d1681 updated manual wrt. Heredoc support for initializing consts and static members (fixes #70227)
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@337388 c90b9560-bf6c-de11-be94-00142212c4b1
2015-08-10 12:50:32 +00:00
Adam Harvey f2f7f3fa1d Add \u to the string type page.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@337357 c90b9560-bf6c-de11-be94-00142212c4b1
2015-08-09 01:16:19 +00:00
Jakub Vrana a2b30c956f Fix version of \e (was not available on Windows before, see bug #61827)
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@335758 c90b9560-bf6c-de11-be94-00142212c4b1
2015-01-15 17:17:37 +00:00
Peter Cowburn eda3b067eb no more "FIXME PHP_6" todo comments
These mostly were about unicode, which probably won't come
with PHP <next major number here>, and FILE_TEXT/FILE_BINARY.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@334374 c90b9560-bf6c-de11-be94-00142212c4b1
2014-07-24 12:28:07 +00:00
Adam Harvey 7c2c57dddc Clarify the uniqueness and stability of casting resources to string/integer.
It was pointed out on comp.lang.php that the existing wording was unclear on
the point of what in the resource->string casting behaviour shouldn't be relied
upon (whether it was not guaranteed that the string is unique, or just that the
exact format of the string is subject to change). I've also added a paragraph
to the integer page noting what a resource->integer cast results in.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@332894 c90b9560-bf6c-de11-be94-00142212c4b1
2014-02-26 21:23:36 +00:00
Sherif Ramadan bf46686034 Remove bad example.
The variable $juice is not defined. The example doesn't make any sense.
Syntactically the interpolation would work had the correct variable name been
used. So I'm removing this portion of the example since it doesn't demonstrate
anything useful.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@332340 c90b9560-bf6c-de11-be94-00142212c4b1
2013-12-10 13:52:31 +00:00
Joe Watkins 8dfa877f00 #65239 precise maximum
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@332084 c90b9560-bf6c-de11-be94-00142212c4b1
2013-11-08 08:06:50 +00:00
Joe Watkins ac59c315a6 #64943 clarity in description
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@331668 c90b9560-bf6c-de11-be94-00142212c4b1
2013-10-04 17:30:48 +00:00
Adam Harvey 8ad0d94e1c Add initial migration guide for PHP 5.5.
What's done: the migration guide itself, updates to existing functions and
functionality, and new language features.

What's not done: stub pages for new functions and methods. (I'd rather get this
in now, though, than have it languish on my hard drive any longer so that other
people can contribute.)

What could use help: the generator chapter is pretty rough and ready. Better
examples would be awesome. I certainly won't argue if somebody wants to add the
function stubs, either.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@328430 c90b9560-bf6c-de11-be94-00142212c4b1
2012-11-20 15:17:23 +00:00
Adam Harvey 13995e9311 Warn users about the perils of multi-byte strings and direct character access.
Or, as xkcd put it today, if it starts pointing toward space you are having a
bad problem and you will not go to space today.

Fixes doc bug #63079 (String access by character is not multibyte-safe).


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@328351 c90b9560-bf6c-de11-be94-00142212c4b1
2012-11-14 02:10:57 +00:00
Nikita Popov d7b608d1cb Move string offset peculiarities between PHP versions off into the string offset docs
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@327267 c90b9560-bf6c-de11-be94-00142212c4b1
2012-08-25 14:37:42 +00:00
Jakub Vrana 84b8fca68f Use <function> for language constructs (now supported by PhD)
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@325214 c90b9560-bf6c-de11-be94-00142212c4b1
2012-04-15 21:45:34 +00:00
Yannick Torres 319b01713c Typo found by online editor user
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@325203 c90b9560-bf6c-de11-be94-00142212c4b1
2012-04-15 11:25:17 +00:00
Yasuo Ohgaki 19fe5f0cb0 fix incorrect description
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@324628 c90b9560-bf6c-de11-be94-00142212c4b1
2012-03-30 10:26:14 +00:00