3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = 'foo'; echo PHP_EOL, 'unset cast', PHP_EOL; var_dump((unset) $a); var_dump($a); echo PHP_EOL, 'unset call', PHP_EOL; unset($a); var_dump($a);
based on idI6O
Output for 7.2.0 - 7.3.0beta1
Deprecated: The (unset) cast is deprecated in /in/PqkIG on line 6 unset cast NULL string(3) "foo" unset call Notice: Undefined variable: a in /in/PqkIG on line 10 NULL
Output for 5.6.0 - 7.1.20
unset cast NULL string(3) "foo" unset call Notice: Undefined variable: a in /in/PqkIG on line 10 NULL