3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $levar = true; function setsome($action) { $GLOBALS['levar']; if ($action == "toggle") { $levar = false; } else if ($action == "get") { return $levar; } } echo setsome('get'); setsome('toggle'); echo setsome('get'); ?>
Output for 5.2.15 - 7.1.0
Notice: Undefined variable: levar in /in/kCDU7 on line 8 Notice: Undefined variable: levar in /in/kCDU7 on line 8