3v4l.org

run code in 300+ PHP versions simultaneously
<?php $id = [11,12,13,56,34,23,34]; $code = ['1234','5678','9012','4343','4543','4642','534']; $qty = [3,4,5,6,7,8,3]; $amount = [12.34,23.45,34.56,66.34,75.32,54.3,23.2]; $loopRun = 0; $max = count($id); $data = []; for ($i=0; $i<ceil($max/2); $i++) { $loopRun++; $data[$i] = [ 'id' => $id[$i], 'code' => $code[$i], 'qty' => $qty[$i], 'amount' => $amount[$i] ]; $data[$max-($i+1)] = [ 'id' => $id[$max-($i+1)], 'code' => $code[$max-($i+1)], 'qty' => $qty[$max-($i+1)], 'amount' => $amount[$max-($i+1)] ]; } ksort($data); echo "Loop Run Count : ".$loopRun."\n\n"; print_r($data);

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.4.140.0150.00717.67
8.4.130.0130.00717.79
8.4.120.0140.00522.48
8.4.110.0130.00718.68
8.4.100.0140.00617.51
8.4.90.0130.00817.75
8.4.80.0050.00318.00
8.4.70.0060.00819.52
8.4.60.0080.00617.93
8.4.50.0040.00518.63
8.4.40.0070.01319.66
8.4.30.0150.00618.60
8.4.20.0080.00818.00
8.4.10.0030.00619.49
8.3.270.0130.00716.52
8.3.260.0150.00516.44
8.3.250.0080.00718.95
8.3.240.0080.00916.64
8.3.230.0130.00716.78
8.3.220.0040.00417.34
8.3.210.0090.00616.63
8.3.200.0100.01016.86
8.3.190.0100.00816.52
8.3.180.0130.00616.49
8.3.170.0120.00617.21
8.3.160.0140.00018.31
8.3.150.0060.01216.98
8.3.140.0040.00417.29
8.3.130.0040.00418.41
8.3.120.0040.00420.80
8.3.110.0000.00820.94
8.3.100.0060.00318.18
8.3.90.0100.01018.53
8.3.80.0030.00619.36
8.3.70.0110.00418.55
8.3.60.0140.00718.43
8.3.50.0150.00323.57
8.3.40.0150.00618.80
8.3.30.0150.00418.92
8.3.20.0090.00921.00
8.3.10.0140.00021.98
8.3.00.0070.00022.03
8.2.290.0060.00720.67
8.2.280.0070.00218.29
8.2.270.0070.01017.16
8.2.260.0080.00016.43
8.2.250.0070.01318.09
8.2.240.0070.00717.49
8.2.230.0080.00022.58
8.2.220.0120.00424.06
8.2.210.0070.00726.77
8.2.200.0050.00518.88
8.2.190.0090.00616.80
8.2.180.0070.01418.54
8.2.170.0140.00722.96
8.2.160.0030.01022.09
8.2.150.0030.00624.18
8.2.140.0040.00424.66
8.2.130.0030.00626.16
8.2.120.0080.00021.09
8.2.110.0060.00320.52
8.2.100.0000.01218.03
8.2.90.0050.00318.16
8.2.80.0080.00017.97
8.2.70.0000.00817.63
8.2.60.0060.00317.93
8.2.50.0000.00817.98
8.2.40.0050.00318.44
8.2.30.0000.00718.11
8.2.20.0040.00418.17
8.2.10.0000.00719.38
8.2.00.0020.00519.32
8.1.330.0110.00818.38
8.1.320.0070.00317.92
8.1.310.0040.00418.47
8.1.300.0030.00619.82
8.1.290.0030.00630.84
8.1.280.0120.00425.92
8.1.270.0060.00323.98
8.1.260.0000.00926.35
8.1.250.0110.00728.09
8.1.240.0090.00020.77
8.1.230.0110.00021.04
8.1.220.0100.00017.78
8.1.210.0030.00518.77
8.1.200.0000.00817.35
8.1.190.0000.00917.47
8.1.180.0060.00318.10
8.1.170.0050.00317.62
8.1.160.0000.00718.89
8.1.150.0000.00819.04
8.1.140.0040.00420.84
8.1.130.0000.00720.33
8.1.120.0060.00317.53
8.1.110.0040.00417.52
8.1.100.0000.00817.46
8.1.90.0030.00517.50
8.1.80.0050.00217.54
8.1.70.0050.00317.52
8.1.60.0030.00617.62
8.1.50.0000.00917.59
8.1.40.0050.00517.55
8.1.30.0000.00817.71
8.1.20.0000.00817.63
8.1.10.0040.00417.55
8.1.00.0000.00717.51
8.0.300.0040.00420.01
8.0.290.0000.00816.58
8.0.280.0070.00018.42
8.0.270.0030.00317.99
8.0.260.0030.00320.18
8.0.250.0040.00416.86
8.0.240.0000.00817.04
8.0.230.0000.00616.93
8.0.220.0040.00416.93
8.0.210.0070.00017.01
8.0.200.0030.00317.03
8.0.190.0070.00017.09
8.0.180.0030.00616.87
8.0.170.0040.00416.98
8.0.160.0000.00716.86
8.0.150.0030.00316.94
8.0.140.0000.00816.92
8.0.130.0030.00313.39
8.0.120.0040.00416.90
8.0.110.0030.00316.93
8.0.100.0040.00416.98
8.0.90.0030.00616.93
8.0.80.0100.01216.94
8.0.70.0030.00516.97
8.0.60.0040.00416.85
8.0.50.0040.00416.84
8.0.30.0070.01017.40
8.0.20.0130.00717.13
8.0.10.0040.00417.03
8.0.00.0100.00716.71
7.4.330.0050.00016.78
7.4.320.0000.00616.68
7.4.300.0030.00316.57
7.4.290.0000.00716.63
7.4.280.0050.00316.57
7.4.270.0000.00716.66
7.4.260.0030.00313.29
7.4.250.0070.00016.46
7.4.240.0020.00516.62
7.4.230.0030.00316.64
7.4.220.0040.00416.61
7.4.210.0050.01116.60
7.4.200.0040.00416.41
7.4.130.0150.00316.57
7.4.120.0070.01016.66
7.4.110.0110.00516.45
7.4.100.0100.00716.68
7.4.90.0090.00916.55
7.4.80.0110.01119.39
7.4.70.0120.00416.55
7.4.60.0100.00716.64
7.4.50.0120.00616.58
7.4.40.0030.01416.74
7.4.10.0060.01116.51
7.4.00.0110.00616.53
7.3.330.0070.00016.40
7.3.320.0050.00013.11
7.3.310.0070.00016.47
7.3.300.0040.00416.43
7.3.290.0090.00916.39
7.3.260.0130.01016.30
7.3.240.0100.00916.54
7.3.230.0190.00316.43
7.3.210.0030.01316.48
7.3.200.0130.00416.51
7.3.190.0160.00816.43
7.3.180.0150.00316.71
7.3.170.0120.00916.20
7.3.160.0110.00816.46
7.3.130.0080.00716.53
7.3.120.0070.01016.34
7.3.110.0100.00716.43
7.3.100.0030.01316.36
7.3.90.0050.01216.46
7.3.80.0060.01116.37
7.3.70.0040.01216.29
7.3.60.0110.00916.43
7.3.50.0100.01116.43
7.3.40.0050.01216.42
7.3.30.0080.01016.40
7.3.20.0110.01116.36
7.3.10.0120.01016.37
7.3.00.0060.01116.36
7.2.330.0090.00916.74
7.2.320.0130.00316.64
7.2.310.0140.00916.71
7.2.300.0100.01316.43
7.2.290.0070.01116.85
7.2.260.0080.00816.71
7.2.250.0060.01016.69
7.2.240.0050.01116.64
7.2.230.0050.01216.48
7.2.220.0100.00716.48
7.2.210.0060.01116.65
7.2.200.0090.01016.55
7.2.190.0100.01016.63
7.2.180.0170.00416.53
7.2.170.0040.01316.62
7.2.160.0080.01016.57
7.2.150.0120.00716.66
7.2.140.0080.01016.64
7.2.130.0060.01316.60
7.2.120.0100.00716.71
7.2.110.0110.00616.57
7.2.100.0090.00816.69
7.2.90.0060.01216.57
7.2.80.0100.00816.63
7.2.70.0080.00916.55
7.2.60.0110.00816.65
7.2.50.0120.00616.50
7.2.40.0070.01116.67
7.2.30.0110.00816.67
7.2.20.0050.01316.64
7.2.10.0080.00916.57
7.2.00.0140.00316.42

preferences:
31.92 ms | 403 KiB | 5 Q