3v4l.org

run code in 200+ 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 C3WoG
Output for 5.0.4 - 7.2.0
helloarray(2) { ["a"]=> string(1) "a" ["b"]=> string(1) "c" } Notice: Undefined variable: row in /in/B2ULi on line 8 Notice: Undefined variable: row in /in/B2ULi 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/B2ULi on line 8 Notice: Undefined variable: row in /in/B2ULi on line 8 array(3) { ["a"]=> string(1) "a" ["b"]=> string(1) "c" [""]=> NULL }