3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $matchVal = array(); $nowScore = 1; $matchVal[$nowScore] = array(); $matchVal[$nowScore][] = 56; $matchVal[$nowScore][] = 78; $nowScore = 4; $matchVal[$nowScore] = array(); $matchVal[$nowScore][] = 156; $matchVal[$nowScore][] = 178; ksort($matchVal); foreach($matchVal as $key => $val) { print($key." --> ".$val); } php?>
based on SBjsE
Output for 5.4.0 - 7.1.0
Notice: Array to string conversion in /in/u8u8p on line 15 1 --> Array Notice: Array to string conversion in /in/u8u8p on line 15 4 --> Array Notice: Use of undefined constant php - assumed 'php' in /in/u8u8p on line 17
Output for 4.3.0 - 5.3.29
1 --> Array4 --> Array Notice: Use of undefined constant php - assumed 'php' in /in/u8u8p on line 17