3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = token_get_all("<?php class RegistrationFormType extends AbstractType { public function buildForm(FormBuilderInterface $builder, array $options) { $builder ->add('username', TextType::class, array('label' => 'form.username')) ; } } "); foreach ($a as $t) { if (isset($t[1])) { echo token_name($t[0]), "\n"; } else { echo $t, "\n"; } }
based on Y76B0
Output for 7.0.0 - 7.2.0
Notice: Undefined variable: builder in /in/Mo7Is on line 7 Notice: Undefined variable: options in /in/Mo7Is on line 7 Notice: Undefined variable: builder in /in/Mo7Is on line 9 T_OPEN_TAG T_WHITESPACE T_CLASS T_WHITESPACE T_STRING T_WHITESPACE T_EXTENDS T_WHITESPACE T_STRING T_WHITESPACE { T_WHITESPACE T_PUBLIC T_WHITESPACE T_FUNCTION T_WHITESPACE T_STRING ( T_STRING T_WHITESPACE , T_WHITESPACE T_ARRAY T_WHITESPACE ) T_WHITESPACE { T_WHITESPACE T_OBJECT_OPERATOR T_STRING ( T_CONSTANT_ENCAPSED_STRING , T_WHITESPACE T_STRING T_DOUBLE_COLON T_CLASS , T_WHITESPACE T_ARRAY ( T_CONSTANT_ENCAPSED_STRING T_WHITESPACE T_DOUBLE_ARROW T_WHITESPACE T_CONSTANT_ENCAPSED_STRING ) ) T_WHITESPACE ; T_WHITESPACE } T_WHITESPACE } T_WHITESPACE
Output for 5.3.19 - 5.6.21
Notice: Undefined variable: builder in /in/Mo7Is on line 7 Notice: Undefined variable: options in /in/Mo7Is on line 9 Notice: Undefined variable: builder in /in/Mo7Is on line 14 T_OPEN_TAG T_WHITESPACE T_CLASS T_WHITESPACE T_STRING T_WHITESPACE T_EXTENDS T_WHITESPACE T_STRING T_WHITESPACE { T_WHITESPACE T_PUBLIC T_WHITESPACE T_FUNCTION T_WHITESPACE T_STRING ( T_STRING T_WHITESPACE , T_WHITESPACE T_ARRAY T_WHITESPACE ) T_WHITESPACE { T_WHITESPACE T_OBJECT_OPERATOR T_STRING ( T_CONSTANT_ENCAPSED_STRING , T_WHITESPACE T_STRING T_DOUBLE_COLON T_CLASS , T_WHITESPACE T_ARRAY ( T_CONSTANT_ENCAPSED_STRING T_WHITESPACE T_DOUBLE_ARROW T_WHITESPACE T_CONSTANT_ENCAPSED_STRING ) ) T_WHITESPACE ; T_WHITESPACE } T_WHITESPACE } T_WHITESPACE