3v4l.org

run code in 500+ PHP versions simultaneously
<?php $code = '<?php class Foo { public const NEW = Bar::NEW; }'; foreach (token_get_all($code, TOKEN_PARSE) as $t) { if (is_array($t) && strcasecmp($t[1], 'new') === 0) { echo token_name($t[0]), ' [', $t[1], ']', PHP_EOL; } }
Output for git.master, git.master_jit
T_NEW [NEW] T_STRING [NEW]

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
44.19 ms | 786 KiB | 4 Q