3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $foobar = "baz"; $a = compact('foobar'); var_dump($a); $varname = array_keys($a); echo $varname;
based on 3CjlR
Output for 5.4.0 - 7.2.0
array(1) { ["foobar"]=> string(3) "baz" } Notice: Array to string conversion in /in/C130M on line 7 Array
Output for 4.3.0 - 5.3.29
array(1) { ["foobar"]=> string(3) "baz" } Array