3v4l.org

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