3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $o = new stdClass; $o->text = "ans1"; $o2 = new stdClass; $o2->text = "ans2"; $o3 = new stdClass; $o3->text = "ans3"; $arr = [$o, $o2, $o3]; $array = array_column($array, 'text'); print_r($array);
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.3.0rc3
Notice: Undefined variable: array in /in/vR2st on line 15 Warning: array_column() expects parameter 1 to be array, null given in /in/vR2st on line 15