3v4l.org

run code in 300+ PHP versions simultaneously
<?php $EyfsAreScores = [ 0 => 4, 2 => [0 => 0, 5 => 2, 11 => 1], 4 => [0 => 0, 7 => 2, 11 => 1], 6 => [0 => 0, 9 => 2, 11 => 1], 8 => [0 => 0, 7 => 4, 9 => 3, 15 => 2, 21 => 1], 10 => [0 => 0, 7 => 4, 11 => 3, 17 => 2, 21 => 1], 12 => [0 => 0, 7 => 4, 13 => 3, 19 => 2, 21 => 1], 14 => [0 => 0, 15 => 4, 17 => 3, 21 => 2, 27 => 1], 16 => [0 => 0, 15 => 4, 19 => 3, 23 => 2, 27 => 1], 18 => [0 => 0, 15 => 4, 21 => 3, 25 => 2, 27 => 1], 20 => [0 => 0, 21 => 4, 23 => 3, 31 => 2, 37 => 1], 22 => [0 => 0, 21 => 4, 25 => 3, 33 => 2, 37 => 1], 24 => [0 => 0, 21 => 4, 27 => 3, 35 => 2, 37 => 1], 26 => [0 => 0, 29 => 4, 33 => 3, 45 => 2, 51 => 1], 28 => [0 => 0, 29 => 4, 35 => 3, 49 => 2, 53 => 1], 30 => [0 => 0, 29 => 4, 39 => 3, 51 => 2, 55 => 1], 32 => [0 => 0, 39 => 4, 45 => 3, 55 => 2, 57 => 1], 34 => [0 => 0, 39 => 4, 55 => 3, 63 => 2, 67 => 1], 36 => [0 => 1, 53 => 4, 59 => 3, 69 => 2], 37 => [0 => 2, 63 => 4, 65 => 3], 38 => [0 => 3, 69 => 4] ]; for ($i = 2; $i < 37; $i = $i + 2) { $EyfsAreScores[$i-1] = $EyfsAreScores[$i]; } $EyfsStep = $EyfsAreScores[20]; var_dump($EyfsStep); foreach ($EyfsStep as $key => $value) { echo $key.':'.$value; }
Output for 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
array(5) { [0]=> int(0) [21]=> int(4) [23]=> int(3) [31]=> int(2) [37]=> int(1) } 0:021:423:331:237:1
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/Ovcc1 on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '[' in /in/Ovcc1 on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/Ovcc1 on line 3
Process exited with code 255.

preferences:
248.07 ms | 401 KiB | 399 Q