3v4l.org

run code in 300+ PHP versions simultaneously
<?php $php = '<?php $var = readonly /* commment */ ();'; foreach (token_get_all($php) as $token) { if (is_array($token)) { echo token_name($token[0]) . "\n"; } else { echo $token . "\n"; } }
Output for 8.1.0 - 8.1.30, 8.2.0 - 8.2.25, 8.3.0 - 8.3.13
T_OPEN_TAG T_VARIABLE T_WHITESPACE = T_WHITESPACE T_READONLY T_WHITESPACE T_COMMENT T_WHITESPACE ( ) ;
Output for 7.4.0 - 7.4.33, 8.0.1 - 8.0.30
T_OPEN_TAG T_VARIABLE T_WHITESPACE = T_WHITESPACE T_STRING T_WHITESPACE T_COMMENT T_WHITESPACE ( ) ;

preferences:
38.93 ms | 407 KiB | 5 Q