3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump( (unset) 'x', (unset) 42, (unset) 0.42, (unset) [42], (unset) new StdClass, (unset) null ); $a = "1"; (unset)$a; var_dump($a);
based on YnOgT
Output for 7.2.0
Deprecated: The (unset) cast is deprecated in /in/hFS6M on line 3 Deprecated: The (unset) cast is deprecated in /in/hFS6M on line 4 Deprecated: The (unset) cast is deprecated in /in/hFS6M on line 5 Deprecated: The (unset) cast is deprecated in /in/hFS6M on line 6 Deprecated: The (unset) cast is deprecated in /in/hFS6M on line 7 Deprecated: The (unset) cast is deprecated in /in/hFS6M on line 8 Deprecated: The (unset) cast is deprecated in /in/hFS6M on line 11 NULL NULL NULL NULL NULL NULL string(1) "1"
Output for 5.4.2 - 7.1.10
NULL NULL NULL NULL NULL NULL string(1) "1"
Output for 5.3.18 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/hFS6M on line 6
Process exited with code 255.