3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Test; class Test { private $s; private $i; public function __construct(string $s, int $i) { assert($i > 3000); $this->s = $s; $this->i = $i; } public function foo() { return 's: ' . $this->s . ', i: ' . $this->i; } } try { $a = new Test('Hello, world!', 2015); echo $a->foo(); } catch (\Throwable $e) { echo $e; }

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.0120.00616.63
8.3.50.0150.00521.99
8.3.40.0110.00318.57
8.3.30.0110.00418.59
8.3.20.0110.00420.35
8.3.10.0000.00821.64
8.3.00.0040.00419.36
8.2.180.0080.01216.50
8.2.170.0040.01122.96
8.2.160.0050.00820.51
8.2.150.0030.00624.18
8.2.140.0050.00224.66
8.2.130.0090.00017.38
8.2.120.0040.00426.35
8.2.110.0060.00320.36
8.2.100.0080.00418.04
8.2.90.0000.00819.05
8.2.80.0040.00817.97
8.2.70.0030.00517.75
8.2.60.0040.00418.05
8.2.50.0040.00418.07
8.2.40.0040.00519.40
8.2.30.0040.00420.53
8.2.20.0060.00317.67
8.2.10.0040.00418.00
8.2.00.0040.00418.10
8.1.280.0130.00725.92
8.1.270.0060.00623.91
8.1.260.0070.00028.09
8.1.250.0040.00428.09
8.1.240.0040.00423.83
8.1.230.0000.01217.64
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0000.00817.23
8.1.180.0050.00318.10
8.1.170.0040.00418.71
8.1.160.0020.00522.00
8.1.150.0000.00718.79
8.1.140.0040.00419.53
8.1.130.0030.00317.82
8.1.120.0070.00017.41
8.1.110.0040.00417.38
8.1.100.0030.00617.52
8.1.90.0040.00417.45
8.1.80.0050.00317.36
8.1.70.0020.00517.46
8.1.60.0000.00817.56
8.1.50.0060.00317.41
8.1.40.0080.00017.54
8.1.30.0060.00317.55
8.1.20.0000.00717.64
8.1.10.0040.00417.47
8.1.00.0020.00517.52
8.0.300.0080.00018.77
8.0.290.0000.00816.63
8.0.280.0040.00418.34
8.0.270.0030.00317.16
8.0.260.0000.00817.24
8.0.250.0070.00017.01
8.0.240.0000.01116.99
8.0.230.0000.00717.10
8.0.220.0000.00716.82
8.0.210.0000.00716.93
8.0.200.0030.00316.97
8.0.190.0000.00717.01
8.0.180.0040.00416.87
8.0.170.0050.00316.86
8.0.160.0040.00416.94
8.0.150.0050.00216.88
8.0.140.0070.00016.88
8.0.130.0060.00013.43
8.0.120.0030.00516.92
8.0.110.0000.00716.92
8.0.100.0030.00416.90
8.0.90.0040.00317.03
8.0.80.0050.01116.91
8.0.70.0000.00716.94
8.0.60.0050.00316.94
8.0.50.0000.00716.81
8.0.30.0080.01317.20
8.0.20.0130.00617.40
8.0.10.0050.00316.92
8.0.00.0110.01016.86
7.4.330.0000.00516.79
7.4.320.0030.00316.64
7.4.300.0070.00016.52
7.4.290.0030.00316.51
7.4.280.0070.00016.41
7.4.270.0000.00716.60
7.4.260.0000.00816.58
7.4.250.0000.00716.41
7.4.240.0040.00416.54
7.4.230.0070.00016.50
7.4.220.0040.01516.42
7.4.210.0080.00816.47
7.4.200.0020.00516.57
7.4.160.0050.00916.65
7.4.150.0090.00917.40
7.4.140.0110.00917.86
7.4.130.0090.01016.59
7.4.120.0110.00616.55
7.4.110.0070.01016.57
7.4.100.0140.00416.41
7.4.90.0090.00916.58
7.4.80.0060.01219.39
7.4.70.0310.02716.41
7.4.60.0130.00316.70
7.4.50.0100.00716.54
7.4.40.0080.01216.43
7.4.30.0130.01116.40
7.4.00.0070.01014.97
7.3.330.0000.00613.14
7.3.320.0050.00013.18
7.3.310.0000.00716.36
7.3.300.0000.00716.23
7.3.290.0040.00416.37
7.3.280.0090.00616.35
7.3.270.0120.00617.40
7.3.260.0110.00716.66
7.3.250.0080.00816.46
7.3.240.0070.00916.28
7.3.230.0100.00716.39
7.3.210.0070.01116.46
7.3.200.0000.01716.59
7.3.190.0000.02016.45
7.3.180.0030.01216.66
7.3.170.0130.00316.38
7.3.160.0060.00916.48
7.3.10.0050.00916.50
7.3.00.0070.00416.71
7.2.330.0070.01016.44
7.2.320.0150.00416.45
7.2.310.0110.00616.70
7.2.300.0090.00916.53
7.2.290.0080.00816.69
7.2.130.0070.00916.82
7.2.120.0050.00916.67
7.2.110.0070.00716.80
7.2.100.0080.00816.87
7.2.90.0100.00817.02
7.2.80.0050.01016.86
7.2.70.0040.00916.74
7.2.60.0050.00716.94
7.2.50.0060.00716.78
7.2.40.0090.00616.80
7.2.30.0100.00516.79
7.2.20.0020.01016.78
7.2.10.0060.00816.90
7.2.00.0050.01017.61
7.1.250.0100.00415.68
7.1.200.0060.00315.77
7.1.100.0030.01018.33
7.1.70.0050.00316.86
7.1.60.0130.01319.48
7.1.50.0060.00616.99
7.1.00.0030.07722.51
7.0.200.0290.00714.57
7.0.60.0300.07019.91
7.0.50.0000.05717.73
7.0.40.0100.04320.23
7.0.30.0470.07320.17
7.0.20.0330.05020.26
7.0.10.0000.06720.24
7.0.00.0070.04020.25
5.6.280.0070.08721.11
5.6.210.0030.05720.55
5.6.200.0030.05018.15
5.6.190.0100.08020.68
5.6.180.0400.07320.64
5.6.170.0300.03720.47
5.6.160.0200.05720.50
5.6.150.0070.03718.22
5.6.140.0100.07718.28
5.6.130.0030.07718.11
5.6.120.0100.07721.00
5.6.110.0170.07021.14
5.6.100.0100.05721.01
5.6.90.0030.08321.07
5.6.80.0030.03720.44
5.5.350.0330.07020.48
5.5.340.0130.07317.95
5.5.330.0100.07720.43
5.5.320.0030.05020.28
5.5.310.0200.06020.35
5.5.300.0070.03717.98
5.5.290.0070.04017.98
5.5.280.0100.04320.89
5.5.270.0170.07320.85
5.5.260.0100.08020.65
5.5.250.0200.07320.70
5.5.240.0200.06320.14

preferences:
42.04 ms | 401 KiB | 5 Q