3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface LifeCycleListener { function before(); function after(); } class LifeCycler { private $listeners = []; public function run(callable $x) { foreach ($this->listeners as $l) $l->before(); $x(); foreach ($this->listeners as $l) $l->after(); } public function addListener(LifeCycleListener $listener) { $this->listeners[] = $listener; } } $lc = new LifeCycler(); $lc->addListener(new class implements LifeCycleListener { function before() { echo "before!\n"; } function after() { echo "after!\n"; } }); $lc->run(function() { echo "running!\n"; });

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.0040.01116.50
8.3.50.0150.00521.98
8.3.40.0110.00718.57
8.3.30.0100.00618.71
8.3.20.0070.00020.39
8.3.10.0040.00423.65
8.3.00.0040.00419.38
8.2.180.0120.00318.41
8.2.170.0050.00922.96
8.2.160.0070.00722.10
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0030.00919.48
8.2.120.0000.00826.35
8.2.110.0030.00620.52
8.2.100.0040.00818.04
8.2.90.0000.00819.21
8.2.80.0080.00017.97
8.2.70.0100.00017.63
8.2.60.0040.00418.05
8.2.50.0040.00418.07
8.2.40.0040.00419.45
8.2.30.0050.00320.54
8.2.20.0000.00917.82
8.2.10.0070.00018.14
8.2.00.0000.00818.09
8.1.280.0070.01525.92
8.1.270.0060.00923.99
8.1.260.0070.00028.09
8.1.250.0070.00028.09
8.1.240.0060.00322.42
8.1.230.0060.00919.44
8.1.220.0030.00517.74
8.1.210.0050.00318.77
8.1.200.0030.00617.35
8.1.190.0040.00417.25
8.1.180.0040.00418.10
8.1.170.0000.00820.20
8.1.160.0040.00421.95
8.1.150.0000.00718.95
8.1.140.0030.00519.50
8.1.130.0030.00317.63
8.1.120.0080.00017.51
8.1.110.0030.00617.38
8.1.100.0000.00817.46
8.1.90.0040.00417.54
8.1.80.0040.00417.43
8.1.70.0000.00717.43
8.1.60.0060.00317.67
8.1.50.0050.00317.59
8.1.40.0030.00517.54
8.1.30.0000.00917.56
8.1.20.0000.00817.59
8.1.10.0040.00417.48
8.1.00.0080.00017.52
8.0.300.0040.00418.77
8.0.290.0040.00416.63
8.0.280.0030.00318.50
8.0.270.0000.00717.18
8.0.260.0000.00617.33
8.0.250.0030.00517.02
8.0.240.0030.00317.02
8.0.230.0050.00317.02
8.0.220.0000.00716.92
8.0.210.0070.00016.94
8.0.200.0040.00416.89
8.0.190.0030.00616.96
8.0.180.0070.00017.00
8.0.170.0030.00616.98
8.0.160.0000.00717.04
8.0.150.0030.00316.85
8.0.140.0040.00416.98
8.0.130.0000.00613.35
8.0.120.0060.00316.97
8.0.110.0000.00816.84
8.0.100.0000.00716.91
8.0.90.0040.00416.81
8.0.80.0100.00716.99
8.0.70.0050.00317.04
8.0.60.0050.00216.99
8.0.50.0000.00716.96
8.0.30.0070.01317.02
8.0.20.0080.01017.40
8.0.10.0000.00717.04
8.0.00.0100.01016.90
7.4.330.0000.00516.70
7.4.320.0070.00016.62
7.4.300.0000.00716.58
7.4.290.0000.00716.50
7.4.280.0040.00416.52
7.4.270.0070.00016.47
7.4.260.0000.00716.56
7.4.250.0000.00716.57
7.4.240.0020.00516.49
7.4.230.0070.00016.61
7.4.220.0070.01116.70
7.4.210.0100.00616.61
7.4.200.0030.00416.61
7.4.160.0070.00716.51
7.4.150.0120.00617.40
7.4.140.0130.00817.86
7.4.130.0130.00916.54
7.4.120.0080.00816.48
7.4.110.0060.01216.33
7.4.100.0100.00716.43
7.4.90.0040.01416.59
7.4.80.0100.00719.39
7.4.70.0040.01616.51
7.4.60.0060.00916.48
7.4.50.0040.01116.37
7.4.40.0090.00816.41
7.4.30.0030.01316.41
7.4.10.0060.01314.73
7.4.00.0050.01214.75
7.3.330.0000.00513.28
7.3.320.0030.00313.31
7.3.310.0000.00716.34
7.3.300.0030.00316.27
7.3.290.0090.00916.28
7.3.280.0110.00716.26
7.3.270.0130.00517.40
7.3.260.0060.01216.44
7.3.250.0100.00716.24
7.3.240.0100.01016.46
7.3.230.0140.00316.39
7.3.210.0060.01216.54
7.3.200.0070.01016.46
7.3.190.0090.00916.67
7.3.180.0080.00816.29
7.3.170.0030.01316.27
7.3.160.0110.00716.57
7.3.130.0000.01814.73
7.3.120.0070.01114.71
7.3.110.0060.01315.00
7.3.100.0030.01214.75
7.3.90.0090.00614.94
7.3.80.0060.00914.77
7.3.70.0070.00714.43
7.3.60.0040.00414.68
7.3.50.0090.00614.64
7.3.40.0000.01314.73
7.3.30.0060.00314.34
7.3.20.0140.00716.77
7.3.10.0140.00716.37
7.3.00.0040.00816.39
7.2.330.0130.00816.42
7.2.320.0100.01016.83
7.2.310.0100.00716.48
7.2.300.0100.01016.58
7.2.290.0090.00916.45
7.2.260.0100.01015.02
7.2.250.0040.01514.98
7.2.240.0060.00815.22
7.2.230.0000.01614.86
7.2.220.0030.01315.21
7.2.210.0030.01315.14
7.2.200.0000.01314.82
7.2.190.0030.01015.09
7.2.180.0040.00714.95
7.2.170.0060.01014.88
7.2.160.0060.01014.68
7.2.150.0030.01016.77
7.2.140.0110.01116.76
7.2.130.0100.00316.69
7.2.120.0000.01016.97
7.2.110.0110.01116.69
7.2.100.0030.00717.00
7.2.90.0110.00716.96
7.2.80.0090.00616.97
7.2.70.0000.01216.95
7.2.60.0060.00717.01
7.2.50.0060.01217.05
7.2.40.0000.01016.95
7.2.30.0040.00716.75
7.2.20.0100.00616.90
7.2.10.0090.00016.73
7.2.00.0130.00817.95
7.1.330.0070.00715.61
7.1.320.0070.00715.71
7.1.310.0030.01015.55
7.1.300.0040.01115.74
7.1.290.0070.00715.63
7.1.280.0030.00615.62
7.1.270.0090.00615.36
7.1.260.0070.01315.88
7.1.250.0030.01015.68
7.1.240.0120.00415.71
7.1.230.0030.00815.50
7.1.220.0000.01415.46
7.1.210.0030.00815.72
7.1.200.0040.00915.67
7.1.190.0030.00915.58
7.1.180.0030.00815.41
7.1.170.0020.01415.75
7.1.160.0040.01115.34
7.1.150.0040.01115.35
7.1.140.0040.00715.86
7.1.130.0070.00715.86
7.1.120.0060.00915.84
7.1.110.0070.00715.80
7.1.100.0070.00516.99
7.1.90.0060.00615.31
7.1.80.0090.00315.73
7.1.70.0030.00516.48
7.1.60.0070.00717.55
7.1.50.0050.01216.23
7.1.40.0000.01515.89
7.1.30.0000.00915.60
7.1.20.0090.00315.85
7.1.10.0040.00415.28
7.1.00.0050.04419.11
7.0.330.0130.00015.28
7.0.320.0070.00715.28
7.0.310.0000.01315.25
7.0.300.0090.00315.33
7.0.290.0000.01315.02
7.0.280.0030.01015.12
7.0.270.0060.00615.21
7.0.260.0030.00614.98
7.0.250.0070.00715.37
7.0.240.0040.01215.50
7.0.230.0040.00715.41
7.0.220.0030.01015.06
7.0.210.0060.00915.29
7.0.200.0500.00515.05
7.0.190.0030.01315.41
7.0.180.0060.00315.21
7.0.170.0080.00015.31
7.0.160.0070.00715.41
7.0.150.0040.00715.19
7.0.140.0070.00715.22
7.0.130.0090.00615.34
7.0.120.0090.00615.34
7.0.110.0070.00314.95
7.0.100.0070.02917.65
7.0.90.0030.03117.61
7.0.80.0120.03317.63
7.0.70.0050.04417.61
7.0.60.0150.04517.49
7.0.50.0060.02317.67
7.0.40.0030.02316.77
7.0.30.0050.04716.69
7.0.20.0030.05216.73
7.0.10.0070.04516.67
7.0.00.0120.04016.63
5.6.400.0030.01014.32
5.6.390.0070.00714.19
5.6.380.0100.00613.82
5.6.370.0000.01114.27
5.6.360.0030.00914.30
5.6.350.0000.00913.63
5.6.340.0060.00614.26
5.6.330.0000.01314.38
5.6.320.0070.01014.35
5.6.310.0040.00714.23
5.6.300.0000.01014.05
5.6.290.0000.01613.95
5.6.280.0020.02617.46
5.6.270.0090.00914.02
5.6.260.0030.00914.15
5.6.250.0080.03617.31
5.6.240.0050.03017.24
5.6.230.0070.02817.41
5.6.220.0120.03917.25
5.6.210.0070.02017.29
5.6.200.0070.04817.50
5.6.190.0120.03717.48
5.6.180.0100.03417.50
5.6.170.0050.04717.47
5.6.160.0060.04117.46
5.6.150.0100.03317.55
5.6.140.0060.02417.50
5.6.130.0050.02517.58
5.6.120.0050.04717.58
5.6.110.0050.02417.50
5.6.100.0070.02517.49
5.6.90.0030.02917.51
5.6.80.0050.04317.13
5.6.70.0060.04217.15
5.6.60.0050.04617.17
5.6.50.0130.03617.20
5.6.40.0050.02517.25
5.6.30.0070.02817.24
5.6.20.0100.01617.21
5.6.10.0050.03617.17
5.6.00.0080.03517.18
5.5.380.0050.04017.19
5.5.370.0040.02417.12
5.5.360.0050.04217.09
5.5.350.0080.02317.07
5.5.340.0080.04117.41
5.5.330.0070.02317.41
5.5.320.0030.02517.32
5.5.310.0030.04617.39
5.5.300.0050.04017.24
5.5.290.0120.03817.43
5.5.280.0040.02317.19
5.5.270.0030.04717.35
5.5.260.0050.02917.46
5.5.250.0090.02117.21
5.5.240.0050.03516.98
5.5.230.0070.04216.89
5.5.220.0070.03216.92
5.5.210.0050.04516.94
5.5.200.0050.03316.91
5.5.190.0050.04217.13
5.5.180.0040.02217.00
5.5.170.0000.00913.93
5.5.160.0080.04317.04
5.5.150.0060.04616.89
5.5.140.0070.04216.77
5.5.130.0050.03617.09
5.5.120.0000.04716.97
5.5.110.0030.02316.92
5.5.100.0110.04116.98
5.5.90.0080.04416.97
5.5.80.0030.02716.98
5.5.70.0050.04317.02
5.5.60.0060.02516.90
5.5.50.0100.04016.95
5.5.40.0080.01617.00
5.5.30.0050.03116.93
5.5.20.0030.02716.93
5.5.10.0060.04016.80
5.5.00.0080.03516.95

preferences:
61.24 ms | 401 KiB | 5 Q