3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { private $test; public function __construct($test = 1) { $this->test = $test; } protected function increaseTest() { $this->test++; } public function getTest() { return $this->test; } } class TestChild extends Test { public function increase() { $this->increaseTest(); } } $test = new TestChild(); echo $test->getTest() . "\n"; $test->increase(); echo $test->getTest() . "\n"; $test2 = new TestChild(5); echo $test2->getTest() . "\n"; $test2->increase(); echo $test2->getTest() . "\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.40.0100.01018.83
8.3.30.0140.00018.81
8.3.20.0040.00420.21
8.3.10.0070.00023.65
8.3.00.0070.00019.06
8.2.170.0110.00322.96
8.2.160.0070.00722.08
8.2.150.0030.00524.18
8.2.140.0030.00524.66
8.2.130.0050.00226.16
8.2.120.0040.00421.04
8.2.110.0000.01120.54
8.2.100.0070.00417.84
8.2.90.0040.00417.75
8.2.80.0000.00818.79
8.2.70.0000.00817.93
8.2.60.0000.00918.22
8.2.50.0050.00518.10
8.2.40.0000.00921.20
8.2.30.0000.00719.23
8.2.20.0040.00417.65
8.2.10.0040.00417.98
8.2.00.0050.00217.63
8.1.270.0060.00319.00
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0090.00023.94
8.1.230.0040.00820.84
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0030.00517.22
8.1.180.0040.00418.90
8.1.170.0000.00918.50
8.1.160.0000.00819.02
8.1.150.0040.00418.83
8.1.140.0040.00417.39
8.1.130.0030.00317.82
8.1.120.0060.00517.32
8.1.110.0070.00017.35
8.1.100.0070.00017.35
8.1.90.0040.00417.37
8.1.80.0000.00917.41
8.1.70.0070.00017.47
8.1.60.0000.00817.45
8.1.50.0050.00317.40
8.1.40.0030.00517.44
8.1.30.0050.00317.65
8.1.20.0030.00617.65
8.1.10.0040.00417.58
8.1.00.0030.00517.50
8.0.300.0000.00718.77
8.0.290.0000.00716.75
8.0.280.0070.00018.44
8.0.270.0000.00717.25
8.0.260.0030.00317.34
8.0.250.0070.00016.84
8.0.240.0060.00016.96
8.0.230.0070.00016.99
8.0.220.0070.00016.80
8.0.210.0070.00016.82
8.0.200.0060.00016.96
8.0.190.0030.00616.96
8.0.180.0000.00716.95
8.0.170.0050.00316.88
8.0.160.0000.00716.86
8.0.150.0060.00316.96
8.0.140.0000.00716.86
8.0.130.0030.00313.28
8.0.120.0080.00016.88
8.0.110.0040.00416.88
8.0.100.0000.00716.86
8.0.90.0000.00716.91
8.0.80.0070.01016.82
8.0.70.0000.00716.75
8.0.60.0080.00016.77
8.0.50.0020.00516.86
8.0.30.0130.01017.06
8.0.20.0150.00817.44
8.0.10.0000.00816.82
8.0.00.0120.00516.65
7.4.330.0050.00015.03
7.4.320.0030.00316.45
7.4.300.0000.00616.39
7.4.290.0030.00316.64
7.4.280.0030.00516.63
7.4.270.0030.00316.61
7.4.260.0050.00316.62
7.4.250.0070.00016.35
7.4.240.0010.00616.50
7.4.230.0030.00316.24
7.4.220.0090.00916.57
7.4.210.0000.02016.54
7.4.200.0040.00416.25
7.4.160.0130.00316.57
7.4.150.0150.00417.40
7.4.140.0090.00717.86
7.4.130.0090.00816.55
7.4.120.0080.01016.44
7.4.110.0210.00316.53
7.4.100.0120.00616.38
7.4.90.0030.01416.32
7.4.80.0060.01119.39
7.4.70.0100.00716.73
7.4.60.0070.01016.57
7.4.50.0040.00416.52
7.4.40.0030.01316.49
7.4.30.0150.00816.48
7.4.00.0070.01115.14
7.3.330.0000.00513.38
7.3.320.0050.00013.32
7.3.310.0000.00716.15
7.3.300.0050.00216.17
7.3.290.0050.00916.28
7.3.280.0090.00916.33
7.3.270.0060.01217.40
7.3.260.0170.00016.53
7.3.250.0050.01116.32
7.3.240.0130.00916.51
7.3.230.0130.00316.46
7.3.210.0060.00916.28
7.3.200.0130.00319.39
7.3.190.0070.00916.48
7.3.180.0110.00516.35
7.3.170.0100.00716.27
7.3.160.0040.01516.56
7.3.10.0030.00916.78
7.3.00.0090.00616.70
7.2.330.0090.00916.44
7.2.320.0130.01016.84
7.2.310.0070.01116.46
7.2.300.0130.01116.64
7.2.290.0030.01516.85
7.2.130.0030.01016.92
7.2.120.0040.00817.00
7.2.110.0140.00316.95
7.2.100.0080.00016.67
7.2.90.0060.00316.59
7.2.80.0030.01016.98
7.2.70.0030.01016.84
7.2.60.0000.00917.07
7.2.50.0030.00916.96
7.2.40.0090.00317.15
7.2.30.0040.00716.73
7.2.20.0090.00616.91
7.2.10.0000.00916.62
7.2.00.0050.00818.13
7.1.250.0050.00515.66
7.1.100.0040.01418.04
7.1.70.0060.00317.13
7.1.60.0060.01819.22
7.1.50.0070.01416.80
7.1.00.0030.07722.36
7.0.200.0030.00316.66
7.0.140.0030.03322.00
7.0.60.0100.03320.02
7.0.50.0230.04717.88
7.0.40.0100.06320.11
7.0.30.0270.08020.07
7.0.20.0300.07320.12
7.0.10.0030.04320.21
7.0.00.0070.05020.32
5.6.280.0070.07021.00
5.6.210.0130.07320.54
5.6.200.0100.08018.23
5.6.190.0100.04020.61
5.6.180.0230.07320.46
5.6.170.0300.03720.54
5.6.160.0130.08020.46
5.6.150.0130.06018.19
5.6.140.0100.08018.29
5.6.130.0070.08018.15
5.6.120.0100.08321.00
5.6.110.0100.08321.09
5.6.100.0070.03720.99
5.6.90.0100.08321.02
5.6.80.0270.07020.39
5.5.350.0270.07720.48
5.5.340.0070.08018.07
5.5.330.0030.05720.41
5.5.320.0270.04720.32
5.5.310.0300.07720.26
5.5.300.0030.08017.97
5.5.290.0100.08017.92
5.5.280.0170.07720.97
5.5.270.0070.08720.88
5.5.260.0070.07320.65
5.5.250.0130.08020.71
5.5.240.0070.08020.35
5.4.450.0130.05319.18
5.4.440.0770.06019.34
5.4.430.0830.04719.32
5.4.420.0870.06319.51
5.4.410.1000.08019.41
5.4.400.0730.05019.16
5.4.390.0600.07318.93
5.4.380.0300.05018.73
5.4.370.0230.05718.61
5.4.360.0270.05018.56
5.4.350.0330.04718.50
5.4.340.0300.07018.62
5.4.320.0170.06018.52
5.4.310.0330.04718.69
5.4.300.0270.05018.61
5.4.290.0300.05318.69
5.4.280.0270.05318.55
5.4.270.0300.05018.74
5.4.260.0200.06018.52
5.4.250.0200.06718.69
5.4.240.0200.06018.64
5.4.230.0300.05018.72
5.4.220.0370.07318.72
5.4.210.0430.06718.49
5.4.200.0300.05016.61
5.4.190.0300.05318.75
5.4.180.0300.05718.70
5.4.170.0300.06018.68
5.4.160.0300.05718.71
5.4.150.0270.05318.69
5.4.140.0370.05016.23
5.4.130.0370.04316.45
5.4.120.0370.05016.29
5.4.110.0500.06016.43
5.4.100.0370.07016.21
5.4.90.0470.06716.19
5.4.80.0330.05316.31
5.4.70.0370.06316.20
5.4.60.0300.05316.17
5.4.50.0430.04716.24
5.4.40.0270.05716.21
5.4.30.0370.05316.25
5.4.20.0170.06316.20
5.4.10.0300.05016.25
5.4.00.0270.05015.88
5.3.290.0430.04314.88
5.3.280.0270.05014.58
5.3.270.0330.04714.84
5.3.260.0300.05014.65
5.3.250.0230.05314.74
5.3.240.0270.05714.72
5.3.230.0330.04714.82
5.3.220.0270.05314.62
5.3.210.0330.05014.61
5.3.200.0200.05314.74
5.3.190.0270.06014.57
5.3.180.0230.06014.59
5.3.170.0270.05014.73
5.3.160.0370.04014.55
5.3.150.0200.05314.59
5.3.140.0170.05714.75
5.3.130.0370.04714.77
5.3.120.0300.05714.61
5.3.110.0200.05714.75
5.3.100.0270.05014.09
5.3.90.0270.05714.02
5.3.80.0300.05014.05
5.3.70.0230.06014.25
5.3.60.0300.04714.09
5.3.50.0300.05014.17
5.3.40.0230.05313.94
5.3.30.0200.05313.95
5.3.20.0300.04713.68
5.3.10.0270.04713.70
5.3.00.0170.05713.81
5.2.170.0230.04711.38
5.2.160.0170.04011.25
5.2.150.0200.04711.26
5.2.140.0170.04311.17
5.2.130.0170.04311.16
5.2.120.0200.03711.09
5.2.110.0200.03711.24
5.2.100.0200.04011.14
5.2.90.0270.03711.12
5.2.80.0200.05011.16
5.2.70.0270.03711.22
5.2.60.0170.04311.11
5.2.50.0170.05011.06
5.2.40.0230.03711.06
5.2.30.0200.04311.02
5.2.20.0130.04710.99
5.2.10.0170.04010.90
5.2.00.0200.04310.76
5.1.60.0170.03310.19
5.1.50.0200.03010.03
5.1.40.0200.03710.06
5.1.30.0130.04710.39
5.1.20.0170.04010.46
5.1.10.0200.03710.18
5.1.00.0230.04010.26
5.0.50.0070.0338.74
5.0.40.0070.0308.55
5.0.30.0170.0378.28
5.0.20.0170.0208.22
5.0.10.0100.0338.22
5.0.00.0100.0408.38
4.4.90.0100.0206.90
4.4.80.0100.0206.90
4.4.70.0100.0236.90
4.4.60.0100.0206.90
4.4.50.0030.0276.90
4.4.40.0070.0376.90
4.4.30.0100.0206.90
4.4.20.0130.0176.90
4.4.10.0030.0276.90
4.4.00.0130.0306.90
4.3.110.0070.0336.90
4.3.100.0170.0236.90
4.3.90.0100.0306.90
4.3.80.0070.0376.90
4.3.70.0030.0236.90
4.3.60.0100.0206.90
4.3.50.0100.0206.90
4.3.40.0130.0306.90
4.3.30.0070.0206.90
4.3.20.0030.0236.90
4.3.10.0030.0236.90
4.3.00.0030.0237.30

preferences:
47.36 ms | 400 KiB | 5 Q