3v4l.org

run code in 300+ PHP versions simultaneously
<?php class cA { /** * Test property for using direct default value */ protected static $item = 'Foo'; /** * Test property for using indirect default value */ protected static $other = 'cA'; public static function method() { print self::$item."\r\n"; // It prints 'Foo' on everyway... :( print self::$other."\r\n"; // We just think that, this one prints 'cA' only, but... :) } public static function setOther($val) { self::$other = $val; // Set a value in this scope. } } class cB extends cA { /** * Test property with redefined default value */ protected static $item = 'mesh';protected static $other = 'ani'; public static function method_set() { self::$other = "mesh"; self::$item = "ani"; } } //cB::setOther('cB'); // It's cB::method()! cB::method_set(); cB::method(); // It's cA::method()!

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.0100.00718.55
8.3.50.0230.00221.27
8.3.40.0040.01118.84
8.3.30.0000.01320.17
8.3.20.0090.00020.21
8.3.10.0000.00921.10
8.3.00.0000.00723.52
8.2.180.0120.00916.50
8.2.170.0110.00322.96
8.2.160.0100.00320.37
8.2.150.0060.00324.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0070.00021.00
8.2.110.0090.00019.39
8.2.100.0060.00617.91
8.2.90.0040.00419.22
8.2.80.0040.00418.03
8.2.70.0100.00017.50
8.2.60.0030.00517.80
8.2.50.0060.00318.07
8.2.40.0030.00517.91
8.2.30.0070.00019.49
8.2.20.0050.00217.66
8.2.10.0040.00417.50
8.2.00.0000.00717.56
8.1.280.0100.00725.92
8.1.270.0030.00623.99
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0000.00823.80
8.1.230.0080.00320.77
8.1.220.0060.00318.77
8.1.210.0040.00418.94
8.1.200.0060.00317.47
8.1.190.0000.00817.50
8.1.180.0050.00318.10
8.1.170.0030.00518.51
8.1.160.0000.00718.82
8.1.150.0050.00218.73
8.1.140.0040.00417.45
8.1.130.0000.00717.74
8.1.120.0080.00017.47
8.1.110.0040.00417.34
8.1.100.0030.00517.43
8.1.90.0000.00817.45
8.1.80.0000.00817.47
8.1.70.0040.00417.47
8.1.60.0000.01017.57
8.1.50.0040.00417.38
8.1.40.0050.00317.52
8.1.30.0000.00817.65
8.1.20.0040.00417.49
8.1.10.0070.00017.54
8.1.00.0020.00517.40
8.0.300.0050.00419.85
8.0.290.0070.00017.18
8.0.280.0030.00318.44
8.0.270.0000.00717.20
8.0.260.0030.00316.74
8.0.250.0000.00717.03
8.0.240.0040.00416.93
8.0.230.0030.00316.93
8.0.220.0000.00716.91
8.0.210.0000.00816.92
8.0.200.0000.00716.97
8.0.190.0070.00016.84
8.0.180.0030.00516.84
8.0.170.0070.00016.94
8.0.160.0000.00716.83
8.0.150.0000.00716.88
8.0.140.0070.00016.89
8.0.130.0080.00313.34
8.0.120.0040.00416.79
8.0.110.0000.00816.99
8.0.100.0070.00016.94
8.0.90.0000.00716.77
8.0.80.0100.01016.82
8.0.70.0000.00716.79
8.0.60.0070.00016.70
8.0.50.0040.00416.78
8.0.30.0070.01117.04
8.0.20.0100.00917.40
8.0.10.0080.00017.00
8.0.00.0120.00616.79
7.4.330.0000.00515.04
7.4.320.0000.00916.44
7.4.300.0000.00616.61
7.4.290.0030.00516.39
7.4.280.0000.00816.53
7.4.270.0030.00516.55
7.4.260.0050.00013.24
7.4.250.0030.00616.46
7.4.240.0030.00316.50
7.4.230.0040.00416.63
7.4.220.0120.00616.62
7.4.210.0050.01016.62
7.4.200.0000.00716.39
7.4.190.0030.00316.63
7.4.160.0150.00816.50
7.4.150.0070.01017.40
7.4.140.0110.00917.86
7.4.130.0100.00816.57
7.4.120.0070.01016.63
7.4.110.0160.00716.36
7.4.100.0110.00616.63
7.4.90.0060.01216.56
7.4.80.0130.00919.39
7.4.70.0150.00616.59
7.4.60.0070.01016.40
7.4.50.0030.00516.27
7.4.40.0030.01322.77
7.4.30.0070.01016.55
7.4.00.0070.00714.90
7.3.330.0000.00513.16
7.3.320.0020.00213.25
7.3.310.0070.00016.17
7.3.300.0060.00016.17
7.3.290.0120.00616.30
7.3.280.0060.01216.29
7.3.270.0140.00617.40
7.3.260.0100.01018.24
7.3.250.0110.00916.56
7.3.240.0110.00816.27
7.3.230.0160.00016.39
7.3.210.0070.01016.29
7.3.200.0070.01019.39
7.3.190.0080.01116.41
7.3.180.0050.01016.52
7.3.170.0060.01116.27
7.3.160.0140.00716.60
7.3.120.0100.00414.89
7.2.330.0070.01116.76
7.2.320.0080.01516.63
7.2.310.0070.01816.66
7.2.300.0170.00716.78
7.2.290.0040.01216.55
7.1.70.0040.00416.89
7.1.60.0040.01119.17
7.1.50.0040.02216.89
7.1.00.0030.04722.44
7.0.200.0070.00716.39
7.0.140.0100.07022.09
7.0.80.0030.04319.89
7.0.70.0030.04319.89
7.0.60.0030.04320.07
7.0.50.0370.04020.30
7.0.40.0000.04320.13
7.0.30.0070.08720.09
7.0.20.0100.03020.11
7.0.10.0070.04320.06
7.0.00.0070.03320.12
5.6.280.0070.07020.91
5.6.230.0030.03720.72
5.6.220.0030.04020.56
5.6.210.0070.03320.63
5.6.200.0030.04321.11
5.6.190.0100.03721.09
5.6.180.0070.06020.93
5.6.170.0070.03721.09
5.6.160.0000.04021.04
5.6.150.0100.06021.03
5.6.140.0070.03721.11
5.6.130.0000.07721.07
5.6.120.0070.03321.04
5.6.110.0000.04721.04
5.6.100.0130.06720.94
5.6.90.0200.07320.96
5.6.80.0070.05720.45
5.6.70.0170.06720.34
5.6.60.0030.06020.41
5.6.50.0100.05020.43
5.6.40.0030.06720.27
5.6.30.0100.07320.38
5.6.20.0070.08020.32
5.6.10.0030.07720.44
5.6.00.0070.04720.53
5.5.370.0000.04320.36
5.5.360.0030.04020.46
5.5.350.0030.05720.38
5.5.340.0070.03320.84
5.5.330.0000.04320.84
5.5.320.0070.03720.91
5.5.310.0100.04720.94
5.5.300.0070.04320.80
5.5.290.0100.03720.89
5.5.280.0000.03720.93
5.5.270.0100.05020.84
5.5.260.0100.07720.93
5.5.250.0100.07720.66
5.5.240.0030.05720.18
5.5.230.0170.07320.25
5.5.220.0170.07020.18
5.5.210.0070.08320.32
5.5.200.0200.06720.22
5.5.190.0170.07020.29
5.5.180.0130.06020.28
5.5.160.0100.07320.25
5.5.150.0130.07720.22
5.5.140.0100.04320.23
5.5.130.0100.08020.25
5.5.120.0000.09020.27
5.5.110.0000.05720.22
5.5.100.0070.07020.09
5.5.90.0070.03720.08
5.5.80.0100.06720.19
5.5.70.0070.07719.97
5.5.60.0100.07020.05
5.5.50.0130.04020.15
5.5.40.0070.07720.14
5.5.30.0030.05019.93
5.5.20.0100.07320.05
5.5.10.0070.08319.92
5.5.00.0130.06319.91
5.4.450.0070.03019.26
5.4.440.0000.08319.46
5.4.430.0030.04019.41
5.4.420.0070.07319.45
5.4.410.0200.04719.12
5.4.400.0030.08719.00
5.4.390.0130.07719.22
5.4.380.0070.05019.13
5.4.370.0070.05719.04
5.4.360.0030.08018.90
5.4.350.0000.08718.97
5.4.340.0070.05019.05
5.4.320.0100.05019.03
5.4.310.0070.05719.18
5.4.300.0070.04719.09
5.4.290.0100.07319.17
5.4.280.0030.05718.90
5.4.270.0100.07319.04
5.4.260.0130.07319.19
5.4.250.0070.04319.22
5.4.240.0070.04718.87
5.4.230.0030.07718.84
5.4.220.0070.06319.02
5.4.210.0070.05719.12
5.4.200.0030.04018.94
5.4.190.0100.04718.89
5.4.180.0200.06319.15
5.4.170.0170.04319.13
5.4.160.0100.06019.13
5.4.150.0200.06719.21
5.4.140.0070.07716.48
5.4.130.0100.04716.54
5.4.120.0000.07716.38
5.4.110.0170.04316.41
5.4.100.0070.07316.49
5.4.90.0100.06716.32
5.4.80.0070.07716.43
5.4.70.0100.06716.53
5.4.60.0070.05316.42
5.4.50.0030.05316.43
5.4.40.0100.07316.45
5.4.30.0070.07016.46
5.4.20.0070.07316.39
5.4.10.0200.06316.32
5.4.00.0130.06315.65
5.3.290.0170.06314.74
5.3.280.0130.07014.59
5.3.270.0070.05314.63
5.3.260.0030.04014.64
5.3.250.0070.04314.60
5.3.240.0070.07314.54
5.3.230.0300.06314.55
5.3.220.0070.08014.62
5.3.210.0070.08014.67
5.3.200.0030.07714.69
5.3.190.0070.07714.59
5.3.180.0170.05714.56
5.3.170.0100.06014.60
5.3.160.0070.07714.63
5.3.150.0100.06314.50
5.3.140.0100.07314.63
5.3.130.0100.08014.62
5.3.120.0070.07014.62
5.3.110.0070.06014.66
5.3.100.0070.05714.06
5.3.90.0100.05714.00
5.3.80.0000.08014.04
5.3.70.0130.03013.93
5.3.60.0000.04714.02
5.3.50.0100.07313.93
5.3.40.0100.05013.88
5.3.30.0100.07013.94
5.3.20.0070.05713.75
5.3.10.0070.06013.72
5.3.00.0030.06713.75
5.2.170.0030.06011.72
5.2.160.0070.06011.72
5.2.150.0000.05711.72
5.2.140.0000.05011.72
5.2.130.0030.03711.72
5.2.120.0070.03711.72
5.2.110.0130.05011.72
5.2.100.0030.05311.72
5.2.90.0070.06011.72
5.2.80.0170.05011.72
5.2.70.0130.04711.72
5.2.60.0030.05011.72
5.2.50.0030.05311.72
5.2.40.0100.05711.72
5.2.30.0070.05711.72
5.2.20.0070.06311.72
5.2.10.0070.06311.72
5.2.00.0100.04311.72
5.1.60.0070.04711.72
5.1.50.0070.03711.72
5.1.40.0000.04011.72
5.1.30.0030.04011.72
5.1.20.0000.05011.72
5.1.10.0030.02711.72
5.1.00.0170.03311.72
5.0.50.0100.04011.72
5.0.40.0070.03711.72
5.0.30.0030.06711.72
5.0.20.0000.04711.72
5.0.10.0030.04311.72
5.0.00.0000.07011.72
4.4.90.0070.03011.72
4.4.80.0000.02011.72
4.4.70.0000.03711.72
4.4.60.0000.03011.72
4.4.50.0030.02711.72
4.4.40.0000.04011.72
4.4.30.0000.02311.72
4.4.20.0000.03011.72
4.4.10.0030.03711.72
4.4.00.0030.05311.72
4.3.110.0070.03011.72
4.3.100.0100.02711.72
4.3.90.0030.03311.72
4.3.80.0070.04711.72
4.3.70.0000.03711.72
4.3.60.0070.02711.72
4.3.50.0070.02711.72
4.3.40.0000.05311.72
4.3.30.0000.03711.72
4.3.20.0070.03011.72
4.3.10.0070.03011.72
4.3.00.0000.03011.72

preferences:
43.84 ms | 401 KiB | 5 Q