Update details of PHP undefined constants
Since PHP 8.0 these now give an error.
This commit is contained in:
parent
32283991c5
commit
2de563a32e
1 changed files with 7 additions and 8 deletions
|
|
@ -226,14 +226,13 @@ echo "E = " . E . "\n";
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
There's one peculiarity of how constants work in PHP which it is useful
|
There's one peculiarity of how constants work in PHP prior to PHP 8
|
||||||
to note (this is not specific to SWIG though) - if you try to use an undeclared
|
which it is useful to note (this is not specific to SWIG though) - if you try
|
||||||
constant, PHP will emit a warning (or a notice in PHP 7.1 and earlier) and then
|
to use an undeclared constant, PHP will emit a warning (or a notice in PHP 7.1
|
||||||
expand the constant to a string version of the constant's name. Unfortunately
|
and earlier) and then expand the constant to a string version of the constant's
|
||||||
it is easy to miss the warning message if you're using PHP in a webserver as
|
name. Unfortunately it is easy to miss the warning message if you're using PHP
|
||||||
it will probably end up in error.log or similar. Apparently this will throw
|
in a webserver as it will probably end up in error.log or similar. PHP 8.0
|
||||||
an Error in a future version of PHP, but until then it's something to be
|
made this an error.
|
||||||
aware of.
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue