Open
Description
Description
Hi, I noticed that since PHP 8.3 the value of T_*
constants changes for each patch version. For example, if I'll use token_get_all and cache or serialize returning result I can got unexpected behavior.
<?php
$text = <<<TXT
<?php
namespace AAA;
require_once '/tmp/dev2/t4.php';
class AAA {
}
\$class = new AAA();
TXT;
$tokens = token_get_all($text);
foreach ($tokens as $token) {
echo json_encode($token) . "\n";
}
For example
T_STRING
constant is 313 for 8.3.0, 8.3.2, 8.3.4, 8.3.7, 8.3.9 versions.
T_STRING
constant is 262 for 8.3.1, 8.3.3, 8.3.5 - 8.3.6, 8.3.8 versions.
However for 8.1, 8.2 there are not changes between php patch versions.
PHP Version
8.3
Operating System
No response