3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $specialRequestCode ="ceva_cod"; $specialRequestNode = []; $specialRequestNode = array('special-request' => array('special-request-code' => $specialRequestCode)); array_push($specialRequestNodes, $specialRequestNode); print_r($specialRequestNode);
based on f9kED
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.3.0beta1
Warning: array_push() expects parameter 1 to be array, null given in /in/tSpHW on line 7 Array ( [special-request] => Array ( [special-request-code] => ceva_cod ) )
Output for hhvm-3.22.0
Warning: Invalid operand type was used: array_push expects array(s) or collection(s) in /in/tSpHW on line -1 Array ( [special-request] => Array ( [special-request-code] => ceva_cod ) )
Output for hhvm-3.18.5 - 3.21.3
Warning: Invalid operand type was used: array_push expects array(s) or collection(s) in /in/tSpHW on line 7 Array ( [special-request] => Array ( [special-request-code] => ceva_cod ) )