3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Session{ public static function set($name, $value){ $path = explode('/', $name); $count = count($path); $_SESSION[$path[0]][$path[1]] = $value; } } $var = Session::set('mysql/host', '127.0.01'); echo $_SESSION['mysql']['host'];
based on i83nM
Output for 5.5.0 - 7.2.0
127.0.01