3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sortedScores = [ ['student_id' => 2, 'total_score' => 443], ['student_id' => 4, 'total_score' => 410], ['student_id' => 1, 'total_score' => 371], ['student_id' => 3, 'total_score' => 170], ]; foreach($sortedScores as $idx => $row) $sortedScores[$idx]['rank'] = $idx+1; var_export($sortedScores);

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.5.00.0140.01019.78
8.4.150.0020.00014.05
8.4.140.0170.01117.60
8.4.130.0070.00717.38
8.4.120.0090.01024.34
8.4.110.0030.00618.25
8.4.100.0110.00918.79
8.4.90.0090.00720.52
8.4.80.0090.01118.84
8.4.70.0090.00717.93
8.4.60.0120.00818.95
8.4.50.0120.00722.34
8.4.40.0060.01019.36
8.4.30.0060.01018.75
8.4.20.0040.00425.82
8.4.10.0100.00023.77
8.3.280.0150.00418.38
8.3.270.0160.00516.78
8.3.260.0120.00716.77
8.3.250.0100.00818.70
8.3.240.0090.01017.38
8.3.230.0050.00416.40
8.3.220.0080.01018.77
8.3.210.0090.00616.57
8.3.200.0100.01016.51
8.3.190.0140.00517.17
8.3.180.0050.00317.05
8.3.170.0120.00618.94
8.3.160.0090.00917.13
8.3.150.0170.00019.00
8.3.140.0070.01118.95
8.3.130.0080.00018.29
8.3.120.0090.00020.73
8.3.110.0090.00020.94
8.3.100.0000.00818.34
8.3.90.0000.00826.77
8.3.80.0040.00418.55
8.3.70.0140.00416.75
8.3.60.0080.00816.85
8.3.50.0150.00618.56
8.3.40.0030.01020.17
8.3.30.0070.00718.65
8.3.20.0050.00224.18
8.3.10.0040.00424.66
8.3.00.0000.00826.16
8.2.290.0110.00720.53
8.2.280.0030.00518.55
8.2.270.0110.00717.17
8.2.260.0080.00016.55
8.2.250.0040.00416.71
8.2.240.0140.00317.44
8.2.230.0080.00022.58
8.2.220.0060.00324.06
8.2.210.0050.00226.77
8.2.200.0050.00518.16
8.2.190.0100.00716.58
8.2.180.0170.00316.75
8.2.170.0040.01119.07
8.2.160.0070.00722.96
8.2.150.0070.00025.66
8.2.140.0040.00424.66
8.2.130.0090.00326.16
8.2.120.0050.00319.98
8.2.110.0030.00622.04
8.2.100.0080.00317.72
8.2.90.0030.00619.70
8.2.80.0030.00617.63
8.2.70.0000.00817.63
8.2.60.0080.00018.16
8.2.50.0080.00018.07
8.2.40.0030.00519.93
8.2.30.0030.00518.20
8.2.20.0050.00219.22
8.2.10.0030.00618.06
8.2.00.0130.00417.60
8.1.330.0060.00822.09
8.1.320.0090.01016.29
8.1.310.0070.00716.77
8.1.300.0060.00320.30
8.1.290.0040.00730.84
8.1.280.0130.01025.92
8.1.270.0040.00424.66
8.1.260.0000.00726.35
8.1.250.0050.00328.09
8.1.240.0090.00022.51
8.1.230.0090.00422.82
8.1.220.0000.00817.74
8.1.210.0060.00318.92
8.1.200.0000.00817.13
8.1.190.0050.00317.35
8.1.180.0080.00018.10
8.1.170.0060.00318.50
8.1.160.0020.00518.89
8.1.150.0040.00418.64
8.1.140.0000.00822.14
8.1.130.0000.01417.45
8.1.120.0130.00517.48
8.1.110.0130.00517.52
8.1.100.0090.00617.39
8.1.90.0090.00517.42
8.1.80.0140.00317.50
8.1.70.0140.00317.53
8.1.60.0060.00617.65
8.1.50.0000.01217.45
8.1.40.0100.00317.65
8.1.30.0080.00417.63
8.1.20.0120.00317.54
8.1.10.0150.00417.39
8.1.00.0130.00617.43
8.0.300.0070.00020.03
8.0.290.0000.00716.75
8.0.280.0040.00418.41
8.0.270.0080.00817.01
8.0.260.0120.00417.01
8.0.250.0120.00217.01
8.0.240.0140.00317.01
8.0.230.0080.00817.01
8.0.220.0050.01017.01
8.0.210.0110.00617.01
8.0.200.0110.00517.01
8.0.190.0170.00017.01
8.0.180.0100.00517.01
8.0.170.0090.00617.01
8.0.160.0100.00317.01
8.0.150.0120.00317.01
8.0.140.0040.00817.01
8.0.130.0070.00517.01
8.0.120.0080.00517.01
8.0.110.0060.00917.01
8.0.100.0090.00717.01
8.0.90.0000.01217.01
8.0.80.0140.00317.01
8.0.70.0080.00617.01
8.0.60.0030.00817.01
8.0.50.0080.00517.01
8.0.30.0120.00317.01
8.0.20.0110.00417.01
8.0.10.0090.00317.01

preferences:
31.27 ms | 403 KiB | 5 Q