3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class C { private $s; public function __construct($s) { $this->s = $s; } //or protected function getS() { public final function __toString() { return $this->s; } } class C1 extends C { public function __get($name) { $value = 'wanted:'.$name; $this->$name = $value.',got it again'; return $value; } public function __construct($s1) { parent::__construct($s1); } function doStuff() { echo $this."\n"; echo $this->s."\n"; echo $this->s."\n"; } } $c1 = new C1('foo'); $c1->doStuff();

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.0110.00717.00
8.3.50.0110.00822.00
8.3.40.0040.01118.76
8.3.30.0150.00618.72
8.3.20.0000.00820.34
8.3.10.0000.00823.52
8.3.00.0060.00319.25
8.2.180.0150.00316.88
8.2.170.0070.00722.96
8.2.160.0140.00020.27
8.2.150.0030.00524.18
8.2.140.0080.00024.66
8.2.130.0000.00820.25
8.2.120.0040.00426.35
8.2.110.0100.00022.16
8.2.100.0030.00918.04
8.2.90.0080.00019.27
8.2.80.0040.00417.97
8.2.70.0000.00817.75
8.2.60.0040.00417.93
8.2.50.0040.00418.07
8.2.40.0000.00921.06
8.2.30.0000.00720.51
8.2.20.0050.00217.74
8.2.10.0030.00618.20
8.2.00.0060.00317.99
8.1.280.0070.00725.92
8.1.270.0110.00423.92
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0090.00023.98
8.1.230.0060.00619.03
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0000.01017.35
8.1.190.0000.00717.60
8.1.180.0000.00718.10
8.1.170.0040.00418.65
8.1.160.0060.00322.07
8.1.150.0000.00818.89
8.1.140.0050.00319.70
8.1.130.0000.00717.79
8.1.120.0050.00317.48
8.1.110.0040.00417.52
8.1.100.0040.00417.43
8.1.90.0030.00417.40
8.1.80.0000.00817.44
8.1.70.0030.00317.35
8.1.60.0070.00317.63
8.1.50.0030.00517.53
8.1.40.0000.00817.41
8.1.30.0040.00417.55
8.1.20.0000.00717.55
8.1.10.0050.00317.62
8.1.00.0030.00517.41
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0070.00018.44
8.0.270.0080.00017.20
8.0.260.0030.00317.12
8.0.250.0000.00816.85
8.0.240.0000.00816.88
8.0.230.0000.00816.88
8.0.220.0030.00316.79
8.0.210.0060.00316.80
8.0.200.0030.00316.93
8.0.190.0080.00016.97
8.0.180.0000.00716.91
8.0.170.0050.00316.95
8.0.160.0070.00016.79
8.0.150.0040.00416.86
8.0.140.0030.00616.88
8.0.130.0000.00613.29
8.0.120.0050.00316.92
8.0.110.0070.00016.91
8.0.100.0040.00416.90
8.0.90.0070.00016.71
8.0.80.0090.01216.96
8.0.70.0080.00016.98
8.0.60.0080.00016.85
8.0.50.0060.00316.96
8.0.30.0100.00817.06
8.0.20.0050.01317.40
8.0.10.0090.00016.82
8.0.00.0080.01016.82
7.4.330.0020.00216.89
7.4.320.0000.00816.50
7.4.300.0040.00416.36
7.4.290.0000.00716.63
7.4.280.0050.00516.49
7.4.270.0030.00316.57
7.4.260.0070.00016.45
7.4.250.0040.00416.55
7.4.240.0050.00216.49
7.4.230.0070.00016.61
7.4.220.0150.00316.63
7.4.210.0090.00616.68
7.4.200.0000.00816.45
7.4.160.0040.01116.33
7.4.150.0120.00617.40
7.4.140.0170.00517.86
7.4.130.0070.01016.61
7.4.120.0120.00516.41
7.4.110.0070.01016.58
7.4.100.0100.01316.59
7.4.90.0030.01316.37
7.4.80.0060.01219.39
7.4.70.0100.01016.58
7.4.60.0090.00616.55
7.4.50.0060.00916.58
7.4.40.0070.00916.59
7.4.30.0130.01016.47
7.4.00.0040.01214.75
7.3.330.0030.00313.34
7.3.320.0050.00013.34
7.3.310.0040.00416.36
7.3.300.0000.00716.37
7.3.290.0030.01116.35
7.3.280.0060.01016.40
7.3.270.0030.01317.40
7.3.260.0140.00416.46
7.3.250.0100.01016.44
7.3.240.0100.01016.31
7.3.230.0040.01516.55
7.3.210.0090.00916.55
7.3.200.0090.01216.48
7.3.190.0070.01016.47
7.3.180.0150.00616.23
7.3.170.0070.01116.50
7.3.160.0110.01116.36
7.3.120.0060.00914.80
7.3.110.0060.00914.90
7.3.100.0040.01114.61
7.3.90.0050.00214.75
7.3.80.0090.00014.88
7.3.70.0000.01414.79
7.3.60.0030.00715.03
7.3.50.0070.00714.93
7.3.40.0040.01114.78
7.3.30.0070.00714.91
7.3.20.0070.01016.48
7.3.10.0070.00416.86
7.3.00.0050.00816.72
7.2.330.0060.01216.77
7.2.320.0090.01016.83
7.2.310.0070.01316.76
7.2.300.0130.00316.68
7.2.290.0060.01016.72
7.2.240.0140.00014.83
7.2.230.0070.00714.90
7.2.220.0150.00314.89
7.2.210.0090.00614.77
7.2.200.0040.01115.02
7.2.190.0060.00915.06
7.2.180.0110.00715.09
7.2.170.0100.00315.04
7.2.160.0110.00314.83
7.2.150.0000.01516.98
7.2.140.0060.00317.00
7.2.130.0030.00717.00
7.2.120.0000.01117.09
7.2.110.0070.01117.13
7.2.100.0040.01116.86
7.2.90.0000.01316.93
7.2.80.0090.00016.90
7.2.70.0100.00317.09
7.2.60.0050.00916.98
7.2.50.0000.01217.03
7.2.40.0090.00616.93
7.2.30.0120.00316.96
7.2.20.0000.01416.96
7.2.10.0030.01117.10
7.2.00.0060.00618.23
7.1.330.0030.01015.64
7.1.320.0070.00315.90
7.1.310.0090.00315.73
7.1.300.0070.00315.70
7.1.290.0000.01415.39
7.1.280.0130.00015.80
7.1.270.0030.00615.45
7.1.260.0070.00715.93
7.1.250.0110.00415.42
7.1.200.0060.00615.83
7.1.100.0060.00617.75
7.1.70.0000.01016.97
7.1.60.0030.01319.36
7.1.50.0030.00816.92
7.1.00.0030.07722.37
7.0.200.0050.00316.78
7.0.60.0130.07719.78
7.0.50.0100.07017.95
7.0.40.0070.04020.24
7.0.30.0170.08020.06
7.0.20.0200.05320.09
7.0.10.0000.09020.07
7.0.00.0100.08020.09
5.6.280.0000.04320.92
5.6.210.0100.05020.56
5.6.200.0030.06318.20
5.6.190.0070.05020.67
5.6.180.0500.07020.41
5.6.170.0400.06320.56
5.6.160.0070.08320.39
5.6.150.0100.07718.19
5.6.140.0000.05318.30
5.6.130.0100.03318.23
5.6.120.0000.04320.96
5.6.110.0130.04020.96
5.6.100.0100.08020.94
5.6.90.0030.08021.13
5.6.80.0170.07320.38
5.5.350.0230.07720.43
5.5.340.0030.09018.09
5.5.330.0130.05020.48
5.5.320.0130.08020.27
5.5.310.0330.07320.30
5.5.300.0070.06017.97
5.5.290.0070.08318.08
5.5.280.0130.07020.89
5.5.270.0100.03320.91
5.5.260.0130.07320.88
5.5.250.0370.07020.66
5.5.240.0430.06320.25

preferences:
36.34 ms | 401 KiB | 5 Q