diff options
author | Olly Betts <olly@survex.com> | 2019-05-22 11:13:55 +1200 |
---|---|---|
committer | Olly Betts <olly@survex.com> | 2019-05-22 11:13:55 +1200 |
commit | e87811223c39adb0daad7ccd441a550ebff3eef0 (patch) | |
tree | cf43c7265d374dfc066b83b67b8eab9baffc22df /Doc | |
parent | 1dd5d50c9992716a37bfd760f0e7706ce459fef1 (diff) | |
download | swig-e87811223c39adb0daad7ccd441a550ebff3eef0.tar.gz |
[php] Update docs about undefined constants
PHP 7.2 made these a warning instead of just a notice, and apparently it
will throw an Error in a future version of PHP.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/Manual/Php.html | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Doc/Manual/Php.html b/Doc/Manual/Php.html index d80731c5c..d0ec0df7f 100644 --- a/Doc/Manual/Php.html +++ b/Doc/Manual/Php.html @@ -231,10 +231,12 @@ echo "E = " . E . "\n"; <p> There's one peculiarity of how constants work in PHP which it is useful to note (this is not specific to SWIG though) - if you try to use an undeclared -constant, PHP will emit a notice and then expand the constant to a string -version of the constant's name. Unfortunately it is easy to miss the notice -if you're using PHP in a webserver, as it will probably end up in error.log or -similar. +constant, PHP will emit a warning (or a notice in PHP 7.1 and earlier) and then +expand the constant to a string version of the constant's name. Unfortunately +it is easy to miss the warning message if you're using PHP in a webserver as +it will probably end up in error.log or similar. Apparently this will throw +an Error in a future version of PHP, but until then it's something to be +aware of. </p> <p> @@ -268,8 +270,7 @@ if(EASY_TO_MISPEL) { <p> The mis-spelled constant will become the string 'EASY_TO_MISPEL', which is treated as true by the if test, when the value of the intended constant -would be treated as false! Modern versions of PHP will at least issue -a PHP notice by default when this happens. +would be treated as false! </p> <H3><a name="Php_nn2_2">31.2.2 Global Variables</a></H3> |