3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array = array(true => 'a', a => 'b'); var_dump($array);
based on 7hbXT
Output for 7.2.0
Warning: Use of undefined constant a - assumed 'a' (this will throw an Error in a future version of PHP) in /in/KFuI7 on line 3 array(2) { [1]=> string(1) "a" ["a"]=> string(1) "b" }
Output for 5.3.20 - 7.1.10
Notice: Use of undefined constant a - assumed 'a' in /in/KFuI7 on line 3 array(2) { [1]=> string(1) "a" ["a"]=> string(1) "b" }