3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tokens = token_get_all(" <?php class Foo { function __halt_compiler(){} } (new Foo())->__halt_compiler(); not_html(); " ); array_walk($tokens, function($tk) { if(is_array($tk)) { if(($t = token_name($tk[0])) == 'T_WHITESPACE') return; echo "L{$tk[2]}: ".$t." {$tk[1]}", PHP_EOL; } else echo $tk, PHP_EOL; });
Output for git.master, git.master_jit, rfc.property-hooks
L1: T_INLINE_HTML L2: T_OPEN_TAG <?php L4: T_CLASS class L4: T_STRING Foo { L5: T_FUNCTION function L5: T_HALT_COMPILER __halt_compiler ( ) { L5: T_INLINE_HTML } } (new Foo())->__halt_compiler(); not_html();

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:
53.53 ms | 401 KiB | 8 Q