3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $apple = "apple"; var_dump($apple); var_dump((unset) $apple); var_dump($apple); unset($apple); var_dump($apple); var_dump((unset) $apple); var_dump($apple);
Output for 7.2.0 - 7.3.0rc3
Deprecated: The (unset) cast is deprecated in /in/lsWbk on line 5 Deprecated: The (unset) cast is deprecated in /in/lsWbk on line 10 string(5) "apple" NULL string(5) "apple" Notice: Undefined variable: apple in /in/lsWbk on line 9 NULL Notice: Undefined variable: apple in /in/lsWbk on line 10 NULL Notice: Undefined variable: apple in /in/lsWbk on line 11 NULL
Output for 5.0.4 - 7.1.20
string(5) "apple" NULL string(5) "apple" Notice: Undefined variable: apple in /in/lsWbk on line 9 NULL Notice: Undefined variable: apple in /in/lsWbk on line 10 NULL Notice: Undefined variable: apple in /in/lsWbk on line 11 NULL
Output for 4.3.0 - 5.0.3
string(5) "apple" NULL string(5) "apple" Notice: Undefined variable: apple in /in/lsWbk on line 9 NULL Notice: Undefined variable: apple in /in/lsWbk on line 10 NULL Notice: Undefined variable: apple in /in/lsWbk on line 11 NULL