Possible BUG?
[email protected] (zerof) Mon, 6 Dec 2021 12:31:50 -0300
| Newsgroups | php.doc.bugs |
|---|---|
| Message-ID | <[email protected]> |
Why is it that whenever I run this code and different versions of PHP,
in versions 7.4.26 and 8.0.13 it gives a Parse error, but in version
8.1.0 it doesn't give any error?
<?php
if(PHP_MAJOR_VERSION == 8)
{
echo 'PHP '. PHP_VERSION . '<br>';
define("k16a", 0o1023);
echo 'k16a = ' . k16a;
}
else
{
echo 'PHP '. PHP_VERSION . '<br>';
define("k16a", 01023);
echo 'k16a = ' . k16a;
}
// PHP 8.1.0
// k16a = 531
// PHP 8.0.13
// Parse error: syntax error, unexpected identifier "o1023", expecting ")" in ...echo16.php on line 6
// PHP 7.4.26
// Parse error: syntax error, unexpected 'o1023' (T_STRING), expecting ')' in ...echo16.php on line 6
?>
--
prof José Roberto Fernandes ( ZEROF )
São Paulo, SP, Brasil
Esta mensagem (incluindo todos os documentos anexos) é para uso exclusivo de seu destinatário e pode conter informações privilegiadas e confidenciais.
Se você não é o destinatário não deve distribuir, copiar ou arquivar a mensagem (ou seus documentos anexos).
Neste caso, por favor, notifique o remetente da mesma e destrua imediatamente a mensagem e seus documentos anexos.
Este mensaje (incluyendo todos los documentos que lo acompañan) es para el uso exclusivo de su destinatario y puede contener información privilegiada y confidencial.
Si usted no es el destinatario no se debe distribuir, copiar o archivar el mensaje (o los documentos adjuntos).
En este caso, por favor notifique inmediatamente al remitente y destruir el mismo mensaje y su documentación complementaria.
This message (including all attached documents) is for exclusive use by its addressee and may have privileged and confidential information.
If you are not the addressee, you shall not distribute, copy or file the message (or its attached documents).
In this case, please notify the message sender and immediately destroy the message and its attached documents.