3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Task { function __construct($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.4.20.0080.00817.71
8.4.10.0090.00017.75
8.3.150.0100.01018.55
8.3.140.0080.01217.22
8.3.130.0090.00618.41
8.3.120.0070.00420.79
8.3.110.0060.00320.94
8.3.100.0060.00316.92
8.3.90.0190.00326.77
8.3.80.0090.00016.88
8.3.70.0120.00916.63
8.3.60.0090.00616.88
8.3.50.0070.01121.15
8.3.40.0070.01118.89
8.3.30.0120.00318.90
8.3.20.0080.00020.09
8.3.10.0000.00823.53
8.3.00.0080.00017.55
8.2.260.0040.00416.98
8.2.250.0090.00616.95
8.2.240.0160.00318.90
8.2.230.0000.00822.58
8.2.220.0090.00324.06
8.2.210.0030.00726.77
8.2.200.0050.00516.75
8.2.190.0110.00416.63
8.2.180.0090.00625.92
8.2.170.0090.00619.03
8.2.160.0000.01419.52
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0030.00526.16
8.2.120.0110.00017.75
8.2.110.0040.00719.32
8.2.100.0040.00818.16
8.2.90.0080.00017.88
8.2.80.0050.00518.80
8.2.70.0080.00017.75
8.2.60.0030.00617.93
8.2.50.0080.00018.07
8.2.40.0000.00820.00
8.2.30.0000.00718.14
8.2.20.0030.00617.68
8.2.10.0040.00418.06
8.2.00.0030.00618.01
8.1.310.0100.01018.71
8.1.300.0040.00417.93
8.1.290.0090.00030.84
8.1.280.0090.00925.92
8.1.270.0030.00622.13
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00623.96
8.1.230.0090.00317.83
8.1.220.0000.00817.74
8.1.210.0080.00018.77
8.1.200.0030.00717.36
8.1.190.0030.00517.23
8.1.180.0000.00818.10
8.1.170.0030.00518.50
8.1.160.0030.00618.82
8.1.150.0040.00418.81
8.1.140.0060.00319.63
8.1.130.0000.00917.45
8.1.120.0000.00817.48
8.1.110.0040.00417.36
8.1.100.0040.00417.38
8.1.90.0030.00517.37
8.1.80.0000.00717.36
8.1.70.0000.00717.49
8.1.60.0080.00017.59
8.1.50.0000.00817.47
8.1.40.0030.00517.52
8.1.30.0050.00317.57
8.1.20.0030.00517.64
8.1.10.0040.00417.46
8.1.00.0000.00817.37
8.0.300.0040.00418.77
8.0.290.0060.00316.61
8.0.280.0070.00018.46
8.0.270.0000.00817.21
8.0.260.0030.00316.70
8.0.250.0060.00317.00
8.0.240.0030.00616.95
8.0.230.0040.00416.94
8.0.220.0040.00416.95
8.0.210.0080.00016.80
8.0.200.0000.00717.01
8.0.190.0070.00016.99
8.0.180.0000.00716.95
8.0.170.0060.00316.82
8.0.160.0070.00016.92
8.0.150.0050.00316.88
8.0.140.0030.00516.77
8.0.130.0060.00013.37
8.0.120.0000.00816.74
8.0.110.0040.00416.95
8.0.100.0040.00417.02
8.0.90.0040.00416.78
8.0.80.0130.00316.87
8.0.70.0050.00216.79
8.0.60.0040.00416.84
8.0.50.0080.00016.95
8.0.30.0130.00717.18
8.0.20.0110.00917.40
8.0.10.0040.00417.05
8.0.00.0090.01016.73
7.4.330.0030.00315.08
7.4.320.0030.00316.52
7.4.300.0070.00016.62
7.4.290.0000.00816.52
7.4.280.0030.00616.51
7.4.270.0000.00816.51
7.4.260.0050.00216.63
7.4.250.0080.00016.42
7.4.240.0050.00216.54
7.4.230.0070.00016.41
7.4.220.0130.00916.64
7.4.210.0100.00716.58
7.4.200.0070.00016.52
7.4.160.0040.01416.70
7.4.150.0180.00017.40
7.4.140.0150.01017.86
7.4.130.0070.01016.52
7.4.120.0110.00816.61
7.4.110.0100.01016.59
7.4.100.0050.01316.54
7.4.90.0140.00716.50
7.4.80.0080.01319.39
7.4.70.0180.00016.61
7.4.60.0070.01016.42
7.4.50.0040.00416.54
7.4.40.0110.01016.34
7.4.30.0150.00316.57
7.4.00.0040.01314.84
7.3.330.0000.00613.28
7.3.320.0000.00513.30
7.3.310.0000.00716.44
7.3.300.0030.00316.32
7.3.290.0050.01116.28
7.3.280.0100.01016.31
7.3.270.0100.00717.40
7.3.260.0100.01316.44
7.3.250.0070.01216.48
7.3.240.0130.00616.42
7.3.230.0000.01716.43
7.3.210.0040.01416.68
7.3.200.0060.01116.40
7.3.190.0070.01716.62
7.3.180.0090.00816.37
7.3.170.0060.01616.66
7.3.160.0140.00416.47
7.3.120.0070.01015.16
7.3.110.0120.00415.02
7.3.100.0040.01115.09
7.3.90.0030.00915.03
7.3.80.0100.00714.88
7.3.70.0000.00914.54
7.3.60.0030.00914.94
7.3.50.0030.01014.68
7.3.40.0030.01314.95
7.3.30.0060.00814.98
7.3.20.0140.00016.59
7.3.10.0000.01016.67
7.3.00.0060.00616.49
7.2.330.0150.00416.76
7.2.320.0080.01616.50
7.2.310.0110.00816.77
7.2.300.0160.00316.37
7.2.290.0000.01816.79
7.2.250.0100.00714.99
7.2.240.0000.01914.86
7.2.230.0100.00615.26
7.2.220.0080.00515.03
7.2.210.0080.00815.26
7.2.200.0130.00315.09
7.2.190.0070.00414.91
7.2.180.0100.00315.30
7.2.170.0040.00814.97
7.2.60.0040.01116.99
7.2.30.0440.01517.76
7.2.20.0330.01317.84
7.2.10.0300.00917.89
7.2.00.0280.01318.33
7.1.330.0100.00315.81
7.1.320.0080.00815.88
7.1.310.0100.00716.13
7.1.300.0060.00915.97
7.1.290.0060.00615.85
7.1.280.0070.01015.93
7.1.270.0000.01515.77
7.1.260.0090.00315.89
7.1.200.0040.01115.80
7.1.150.0340.01216.88
7.1.140.0410.01416.71
7.1.130.1400.01416.55
7.1.120.0440.00816.82
7.1.110.0430.00916.02
7.1.100.0290.01016.13
7.1.90.0350.01716.12
7.1.80.0260.01115.96
7.1.70.0120.00916.13
7.1.60.0290.01226.44
7.1.50.0330.00824.74
7.1.40.0420.01532.61
7.1.30.0560.01932.87
7.1.20.0550.01232.80
7.1.10.0230.01015.01
7.1.00.0160.04218.61
7.0.270.0390.01516.11
7.0.260.0370.01116.59
7.0.250.0290.01115.96
7.0.240.0320.01315.59
7.0.230.0320.01515.52
7.0.220.0230.01015.79
7.0.210.0350.01214.82
7.0.200.0280.00715.82
7.0.190.0360.01114.70
7.0.180.0370.01314.39
7.0.170.0260.01014.50
7.0.160.0240.01014.41
7.0.150.0230.01014.39
7.0.140.0310.01514.53
7.0.130.0270.01114.88
7.0.120.0700.01314.79
7.0.110.0380.01214.78
7.0.100.0280.04517.34
7.0.90.0210.04817.10
7.0.80.0360.04117.21
7.0.70.0280.04317.24
7.0.60.0270.04017.20
7.0.50.0300.03117.44
7.0.40.0200.04917.43
7.0.30.0170.02717.31
7.0.20.0200.03717.37
7.0.10.0140.04517.37
7.0.00.0160.03417.30
5.6.300.0170.06020.75
5.6.290.0240.07620.84
5.6.280.0070.05120.93
5.6.270.0220.05420.78
5.6.260.0210.05620.78
5.6.250.0170.05020.76
5.6.240.0140.07920.79
5.6.230.0160.08020.76
5.6.220.0170.06520.72
5.6.210.0140.06320.56
5.6.200.0130.08020.90
5.6.190.0140.08020.96
5.6.180.0130.07421.02
5.6.170.0150.07521.04
5.6.160.0190.06720.96
5.6.150.0200.07120.93
5.6.140.0150.07721.01
5.6.130.0090.08821.02
5.6.120.0210.07521.06
5.6.110.0100.07420.89
5.6.100.0110.08020.85
5.6.90.0130.08120.88
5.6.80.0060.05220.29
5.6.70.0110.04720.32
5.6.60.0110.06920.39
5.6.50.0140.05320.46
5.6.40.0110.06020.30
5.6.30.0110.07320.31
5.6.20.0110.06320.33
5.6.10.0180.06320.25
5.6.00.0080.07020.35
5.5.380.0120.07919.07
5.5.370.0150.07619.03
5.5.360.0160.06518.97
5.5.350.0060.08619.02
5.5.340.0140.07419.41
5.5.330.0170.05819.47
5.5.320.0110.07019.47
5.5.310.0060.07219.33
5.5.300.0180.07719.45
5.5.290.0120.05319.46
5.5.280.0120.06719.22
5.5.270.0170.07719.38
5.5.260.0140.07419.47
5.5.250.0140.07519.21
5.5.240.0090.06818.74
5.5.230.0070.06218.72
5.5.220.0140.07618.71
5.5.210.0120.07818.79
5.5.200.0090.06318.84
5.5.190.0120.06418.59
5.5.180.0140.07118.81
5.5.160.0060.05418.81
5.5.150.0080.07218.76
5.5.140.0070.06318.73
5.5.130.0100.07818.79
5.5.120.0100.05918.73
5.5.110.0140.06518.82
5.5.100.0070.06618.57
5.5.90.0150.07518.64
5.5.80.0170.05318.50
5.5.70.0150.07418.66
5.5.60.0100.06618.60
5.5.50.0140.07718.74
5.5.40.0080.04918.55
5.5.30.0120.05918.76
5.5.20.0110.05018.63
5.5.10.0170.05418.64
5.5.00.0100.06318.52
5.4.450.0180.06019.36
5.4.440.0120.07119.52
5.4.430.0120.07219.25
5.4.420.0100.07219.40
5.4.410.0100.05619.17
5.4.400.0090.05719.10
5.4.390.0130.07618.99
5.4.380.0160.07218.95
5.4.370.0120.04518.91
5.4.360.0090.07319.06
5.4.350.0120.07219.01
5.4.340.0090.07018.95
5.4.320.0210.07418.99
5.4.310.0130.05119.12
5.4.300.0100.04918.98
5.4.290.0120.06919.08
5.4.280.0120.05219.05
5.4.270.0140.05318.89
5.4.260.0120.06619.06
5.4.250.0180.05919.14
5.4.240.0120.05519.06
5.4.230.0090.06218.98
5.4.220.0080.06918.93
5.4.210.0160.05119.08
5.4.200.0110.06619.03
5.4.190.0140.05819.05
5.4.180.0080.06618.98
5.4.170.0110.05619.11
5.4.160.0100.05419.07
5.4.150.0130.05419.04
5.4.140.0160.05016.55
5.4.130.0160.06516.46
5.4.120.0120.06916.40
5.4.110.0120.06416.54
5.4.100.0130.06116.44
5.4.90.0130.05316.52
5.4.80.0130.04916.58
5.4.70.0110.05916.55
5.4.60.0100.07116.49
5.4.50.0160.06716.41
5.4.40.0180.06316.58
5.4.30.0110.06716.38
5.4.20.0130.04416.44
5.4.10.0100.05416.55
5.4.00.0140.06215.97
5.3.290.0160.06214.66
5.3.280.0080.07014.57
5.3.270.0120.04314.74
5.3.260.0110.06014.79
5.3.250.0090.04614.84
5.3.240.0160.05214.70
5.3.230.0110.07114.63
5.3.220.0090.05014.80
5.3.210.0110.06414.61
5.3.200.0080.04914.68
5.3.190.0090.05714.58
5.3.180.0110.07314.77
5.3.170.0110.06514.77
5.3.160.0110.05214.74
5.3.150.0090.06014.78
5.3.140.0100.05214.79
5.3.130.0110.07614.69
5.3.120.0100.06614.73
5.3.110.0100.06014.72
5.3.100.0140.04814.21
5.3.90.0140.05514.10
5.3.80.0130.06014.26
5.3.70.0120.06614.20
5.3.60.0160.05714.18
5.3.50.0110.06114.17
5.3.40.0160.06113.86
5.3.30.0130.06113.99
5.3.20.0130.06013.88
5.3.10.0100.06313.84
5.3.00.0120.06413.83
5.2.170.0120.05311.24
5.2.160.0080.03411.23
5.2.150.0080.05411.23
5.2.140.0100.05411.29
5.2.130.0070.05011.20
5.2.120.0120.05711.21
5.2.110.0060.04511.25
5.2.100.0110.05911.30
5.2.90.0080.04511.26
5.2.80.0050.03711.14
5.2.70.0070.06011.11
5.2.60.0110.04611.18
5.2.50.0090.05211.07
5.2.40.0070.05211.14
5.2.30.0050.04511.15
5.2.20.0140.04611.13
5.2.10.0140.05110.87
5.2.00.0110.04310.78
5.1.60.0050.03810.13
5.1.50.0080.04410.15
5.1.40.0080.05010.07
5.1.30.0070.04610.26
5.1.20.0050.03110.46
5.1.10.0060.04810.27
5.1.00.0070.03110.12
5.0.50.0060.0308.97
5.0.40.0030.0358.91
5.0.30.0030.0518.81
5.0.20.0070.0308.76
5.0.10.0060.0368.76
5.0.00.0030.0438.77
4.4.90.0040.0228.76
4.4.80.0030.0278.76
4.4.70.0050.0228.76
4.4.60.0060.0238.76
4.4.50.0060.0248.76
4.4.40.0040.0278.76
4.4.30.0050.0188.76
4.4.20.0070.0258.76
4.4.10.0040.0248.76
4.4.00.0040.0498.76
4.3.110.0050.0258.76
4.3.100.0050.0258.76
4.3.90.0070.0328.76
4.3.80.0040.0398.76
4.3.70.0060.0158.76
4.3.60.0040.0258.76
4.3.50.0040.0248.76
4.3.40.0030.0418.76
4.3.30.0040.0218.76
4.3.20.0050.0228.76
4.3.10.0030.0318.76
4.3.00.0020.0178.76

preferences:
40.04 ms | 403 KiB | 5 Q