PHP 8.5.0 Beta 1 available for testing

Voting

: five minus zero?
(Example: nine)

The Note You're Voting On

Anonymous
7 years ago
An empty <?php?> Codeblock in PHP 7.2.0 will put out an "Unquoted strings" warning. To prevent that, add at least one empty space into the codeblock.

Example:
<?php

<?php/*
echo "This was some useful code.\n";
*/
?>

?>
Gives: PHP Warning: Use of undefined constant php - assumed 'php' (this will throw an Error in a future version of PHP)

Fix via:
<?php

<?php /*
echo "This was some useful code.\";
*/
?>

?>

Don't know if that is an intentional behaviour or a side effect.

<< Back to user notes page

To Top