3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $comp = '[{"date":"2014-10-04","day:"mon"},{"date":"2014-10-03","day":"tue"}]'; $arr1 = array('date' => '2015-10-04' , 'day' => 'wed'); print_R(json_decode($comp,true)); echo json_encode(array_push(json_decode($comp,true),$arr1));
based on AbQVU
Output for 7.0.0 - 7.2.0
Notice: Only variables should be passed by reference in /in/KK71Y on line 6 Warning: array_push() expects parameter 1 to be array, null given in /in/KK71Y on line 6 null
Output for 5.5.0 - 5.6.28
Strict Standards: Only variables should be passed by reference in /in/KK71Y on line 6 Warning: array_push() expects parameter 1 to be array, null given in /in/KK71Y on line 6 null