3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php foreach(array('T_FINALLY', 'T_INSTEADOF', 'T_TRAIT', 'T_TRAIT_C', 'T_YIELD') as $c) { echo $c, ': '; if(defined($c)) var_dump($c); else var_dump(-1); }
Output for 5.5.24 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
T_FINALLY: string(9) "T_FINALLY" T_INSTEADOF: string(11) "T_INSTEADOF" T_TRAIT: string(7) "T_TRAIT" T_TRAIT_C: string(9) "T_TRAIT_C" T_YIELD: string(7) "T_YIELD"
Output for 5.4.0 - 5.4.45
T_FINALLY: int(-1) T_INSTEADOF: string(11) "T_INSTEADOF" T_TRAIT: string(7) "T_TRAIT" T_TRAIT_C: string(9) "T_TRAIT_C" T_YIELD: int(-1)
Output for 4.3.0 - 5.3.29
T_FINALLY: int(-1) T_INSTEADOF: int(-1) T_TRAIT: int(-1) T_TRAIT_C: int(-1) T_YIELD: int(-1)