3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Task { function Task($id, $start, $end) { $this->id = $id; $this->start = $start; $this->end = $end; $this->pos = $this->start; } function execute() { if ($this->pos < $this->end) { return $this->pos++; } else return false; } } $range = range(1, 100); $ranges = array_chunk($range, 10); $tasks = array(); while (count($ranges)) { $range = array_shift($ranges); $tasks[] = new Task( count($tasks) + 1, array_shift($range), array_pop($range)); } while (count($tasks)) { foreach ($tasks as $id => $task) { if ($task->execute() === false) { printf("task %d complete\n", $task->id); unset($tasks[$id]); } else printf("task %d position %d\n", $task->id, $task->pos); } } ?>

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.3.60.0100.00716.75
8.3.50.0140.00521.19
8.3.40.0090.00618.91
8.3.30.0110.01118.84
8.3.20.0040.00420.38
8.3.10.0050.00323.61
8.3.00.0050.00318.00
8.2.180.0080.00816.88
8.2.170.0160.00622.96
8.2.160.0070.00720.14
8.2.150.0030.00524.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0060.00617.75
8.2.110.0030.00721.17
8.2.100.0080.00417.88
8.2.90.0030.00619.20
8.2.80.0040.00417.97
8.2.70.0040.00417.63
8.2.60.0080.00018.16
8.2.50.0030.00618.07
8.2.40.0040.00419.45
8.2.30.0070.00320.63
8.2.20.0060.00317.68
8.2.10.0060.00318.06
8.2.00.0060.00318.01
8.1.280.0130.00625.92
8.1.270.0040.00423.96
8.1.260.0040.00426.35
8.1.250.0060.00328.09
8.1.240.0060.00322.66
8.1.230.0080.00517.50
8.1.220.0080.00017.74
8.1.210.0000.00818.77
8.1.200.0060.00317.22
8.1.190.0050.00317.23
8.1.180.0000.00718.10
8.1.170.0090.00018.50
8.1.160.0050.00221.99
8.1.150.0000.00818.82
8.1.140.0080.00019.56
8.1.130.0040.00417.59
8.1.120.0040.00417.55
8.1.110.0080.00017.43
8.1.100.0070.00017.38
8.1.90.0030.00617.51
8.1.80.0000.00717.46
8.1.70.0050.00217.53
8.1.60.0080.00017.48
8.1.50.0000.00817.45
8.1.40.0080.00017.48
8.1.30.0000.00817.50
8.1.20.0040.00417.51
8.1.10.0000.00717.43
8.1.00.0030.00617.41
8.0.300.0000.00818.77
8.0.290.0000.00716.88
8.0.280.0030.00318.50
8.0.270.0070.00017.20
8.0.260.0030.00317.28
8.0.250.0040.00417.03
8.0.240.0040.00417.05
8.0.230.0000.00716.98
8.0.220.0030.00316.91
8.0.210.0000.00816.97
8.0.200.0030.00316.95
8.0.190.0000.01017.09
8.0.180.0050.00316.97
8.0.170.0040.00417.00
8.0.160.0050.00316.86
8.0.150.0040.00416.89
8.0.140.0020.00516.93
8.0.130.0030.00313.36
8.0.120.0030.00616.91
8.0.110.0050.00216.86
8.0.100.0000.00717.02
8.0.90.0070.00016.81
8.0.80.0090.00616.90
8.0.70.0040.00416.82
8.0.60.0000.00717.09
8.0.50.0000.00716.88
8.0.30.0180.00317.13
8.0.20.0130.00817.40
8.0.10.0000.00816.91
8.0.00.0060.01316.80
7.4.330.0070.00015.08
7.4.320.0000.00616.43
7.4.300.0060.00016.59
7.4.290.0000.00716.62
7.4.280.0030.00916.46
7.4.270.0030.00316.59
7.4.260.0040.00416.57
7.4.250.0050.00316.40
7.4.240.0050.00216.51
7.4.230.0000.00816.54
7.4.220.0110.00716.39
7.4.210.0120.00716.58
7.4.200.0000.00716.64
7.4.150.0040.01417.40
7.4.140.0090.01117.86
7.4.130.0110.00716.55
7.4.120.0110.00816.57
7.4.110.0110.00716.43
7.4.100.0070.01816.66
7.4.90.0120.00616.41
7.4.80.0090.00919.39
7.4.70.0130.00616.59
7.4.60.0060.01016.57
7.4.50.0000.00816.44
7.4.40.0110.01116.48
7.4.30.0100.00716.61
7.4.00.0090.00715.02
7.3.330.0000.00713.20
7.3.320.0000.00513.22
7.3.310.0030.00516.41
7.3.300.0030.00316.29
7.3.290.0110.00416.38
7.3.280.0070.01116.33
7.3.270.0080.01217.40
7.3.260.0170.00716.52
7.3.240.0100.00916.63
7.3.230.0080.01516.60
7.3.210.0120.00616.33
7.3.200.0040.01216.55
7.3.190.0070.01016.33
7.3.180.0040.01216.36
7.3.170.0180.00516.67
7.3.160.0070.01116.55
7.3.120.0070.01315.00
7.3.110.0060.01314.41
7.3.100.0040.00714.84
7.3.90.0130.00014.55
7.3.80.0120.00314.73
7.3.70.0110.00714.74
7.3.60.0030.01014.70
7.3.50.0080.00414.84
7.3.40.0060.00614.92
7.3.30.0060.00614.58
7.3.20.0110.00016.58
7.3.10.0060.00616.47
7.3.00.0000.01716.72
7.2.330.0070.01116.90
7.2.320.0060.01316.42
7.2.310.0070.01616.82
7.2.300.0070.01116.49
7.2.290.0100.01016.79
7.2.250.0110.00714.73
7.2.240.0060.01315.15
7.2.230.0070.00715.30
7.2.220.0040.00815.27
7.2.210.0090.00915.21
7.2.200.0000.01214.98
7.2.190.0030.01015.04
7.2.180.0080.00315.03
7.2.170.0030.00614.74
7.2.60.0110.00416.75
7.2.00.0030.00919.23
7.1.330.0060.00915.95
7.1.320.0100.00315.60
7.1.310.0050.00515.70
7.1.300.0060.00915.72
7.1.290.0080.00315.64
7.1.280.0100.00615.58
7.1.270.0040.01115.70
7.1.260.0040.01215.86
7.1.200.0090.00315.95
7.1.100.0030.01017.96
7.1.70.0120.00417.18
7.1.60.0030.01419.50
7.1.50.0120.00916.82
7.1.00.0030.07722.42
7.0.200.0030.00616.79
7.0.60.0100.04020.04
7.0.50.0030.08317.89
7.0.40.0100.08320.13
7.0.30.0200.04020.19
7.0.20.0370.07720.34
7.0.10.0130.08320.26
7.0.00.0070.09020.20
5.6.280.0000.03720.97
5.6.210.0100.07020.54
5.6.200.0070.04718.18
5.6.190.0170.08020.61
5.6.180.0400.07320.68
5.6.170.0230.03720.50
5.6.160.0030.08720.44
5.6.150.0000.05018.19
5.6.140.0100.04018.25
5.6.130.0030.09018.23
5.6.120.0070.03721.10
5.6.110.0030.09020.96
5.6.100.0130.08321.01
5.6.90.0100.08320.88
5.6.80.0000.04320.52
5.5.350.0100.05020.45
5.5.340.0100.07718.04
5.5.330.0070.04020.57
5.5.320.3930.04020.34
5.5.310.0400.07020.38
5.5.300.0030.06317.95
5.5.290.0100.07318.00
5.5.280.0070.07720.80
5.5.270.0100.07320.86
5.5.260.0070.08720.77
5.5.250.0100.08020.59
5.5.240.0030.03720.16
5.4.450.1000.04319.43
5.4.440.0970.05019.10
5.4.430.0870.05719.59
5.4.420.0870.05319.44
5.4.410.0800.05719.18
5.4.400.0770.05719.27
5.4.390.0800.05319.14
5.4.380.0800.05319.09
5.4.370.0870.04719.13
5.4.360.0730.07018.78
5.4.350.0930.04319.16
5.4.340.0870.05318.77
5.4.320.1000.04019.10
5.4.310.0930.04718.93
5.4.300.0900.07019.16
5.4.290.0900.05719.28
5.4.280.0930.06019.10
5.4.270.0870.06019.24
5.4.260.0830.07319.27
5.4.250.0730.06718.93
5.4.240.0830.05019.10
5.4.230.0970.04019.08
5.4.220.0830.06019.23
5.4.210.0930.04319.27
5.4.200.0800.05719.11
5.4.190.0770.06018.80
5.4.180.0900.04019.32
5.4.170.0900.04019.25
5.4.160.0770.05719.26
5.4.150.0830.05018.91
5.4.140.0800.05016.29
5.4.130.0870.05316.38
5.4.120.0730.05716.36
5.4.110.0830.07016.28
5.4.100.0830.04316.57
5.4.90.0800.04716.61
5.4.80.0770.05316.55
5.4.70.0900.05316.50
5.4.60.0870.04716.61
5.4.50.0870.05716.54
5.4.40.0830.05316.63
5.4.30.0830.04316.59
5.4.20.0770.05016.40
5.4.10.0870.05016.29
5.4.00.0800.05715.74

preferences:
102.84 ms | 401 KiB | 5 Q