token_get_all() returns different values on same php version

Viewed 21

I'm using PhpCS to detect wrong syntax in my code. This tool use the function token_get_all however I have some inconsistency between PHP version (or even the same PHP version online)

The simplified code is :

var_dump(
    token_get_all('<? ?>')    
);

If I use PHP 7.3 on both this website the results are differents :
https://onlinephp.io/c/c30ec ==> the result is an array of 3 entries
https://3v4l.org/5Ih6Z#v7.4.3 ==> the result is an array of 1 entry

I have the same problem between a php version on docker and my ubuntu.

Does someone have any idea what is the cause of this issue ?
Thank you in advance

0 Answers
Related