3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array = array("name"=>"Sheldon","age"=>"42",BOTH); var_dump($array); list($a,$a) = $array;
Output for 5.3.0 - 7.1.0
Notice: Use of undefined constant BOTH - assumed 'BOTH' in /in/VJTEM on line 2 array(3) { ["name"]=> string(7) "Sheldon" ["age"]=> string(2) "42" [0]=> string(4) "BOTH" } Notice: Undefined offset: 1 in /in/VJTEM on line 4
Output for 4.3.0 - 5.2.17
Notice: Use of undefined constant BOTH - assumed 'BOTH' in /in/VJTEM on line 2 array(3) { ["name"]=> string(7) "Sheldon" ["age"]=> string(2) "42" [0]=> string(4) "BOTH" } Notice: Undefined offset: 1 in /in/VJTEM on line 4