3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $c = new stdClass(); $c->test = "hello"; echo $c->test; $a = array('a'=>'a','b'=>'c'); var_dump($a); $a[$row['c]']] = $row['d']; var_dump($a); ?>
based on KvhTE
Output for 5.0.4 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
helloarray(2) { ["a"]=> string(1) "a" ["b"]=> string(1) "c" } Notice: Undefined variable: row in /in/C3WoG on line 8 Notice: Undefined variable: row in /in/C3WoG on line 8 array(3) { ["a"]=> string(1) "a" ["b"]=> string(1) "c" [""]=> NULL }
Output for 4.3.0 - 5.0.3
helloarray(2) { ["a"]=> string(1) "a" ["b"]=> string(1) "c" } Notice: Undefined variable: row in /in/C3WoG on line 8 Notice: Undefined variable: row in /in/C3WoG on line 8 array(3) { ["a"]=> string(1) "a" ["b"]=> string(1) "c" [""]=> NULL }