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($val1,$val2) { self::$other = $val1; self::$other = $val2; } } //cB::setOther('cB'); // It's cB::method()! 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.01018.18
8.3.50.0160.00421.14
8.3.40.0070.00718.86
8.3.30.0000.01420.15
8.3.20.0000.00820.10
8.3.10.0080.00020.88
8.3.00.0050.00223.65
8.2.180.0090.00616.38
8.2.170.0120.00322.96
8.2.160.0100.00320.35
8.2.150.0060.00324.18
8.2.140.0060.00324.66
8.2.130.0050.00326.16
8.2.120.0070.00021.18
8.2.110.0060.00319.29
8.2.100.0000.01217.91
8.2.90.0050.00219.23
8.2.80.0050.00317.97
8.2.70.0000.00917.63
8.2.60.0040.00417.93
8.2.50.0040.00418.07
8.2.40.0040.00418.04
8.2.30.0030.00619.43
8.2.20.0000.00717.53
8.2.10.0070.00017.63
8.2.00.0000.00717.49
8.1.280.0120.00325.92
8.1.270.0050.00323.99
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0030.00623.86
8.1.230.0030.00721.04
8.1.220.0040.00418.77
8.1.210.0000.00719.02
8.1.200.0030.00717.25
8.1.190.0030.00617.53
8.1.180.0000.00718.10
8.1.170.0040.00418.65
8.1.160.0040.00418.78
8.1.150.0070.00018.50
8.1.140.0000.00717.33
8.1.130.0030.00317.64
8.1.120.0000.00717.40
8.1.110.0080.00017.27
8.1.100.0000.00817.32
8.1.90.0040.00417.43
8.1.80.0000.00717.41
8.1.70.0060.00317.27
8.1.60.0090.00317.41
8.1.50.0000.00717.30
8.1.40.0040.00417.43
8.1.30.0080.00017.62
8.1.20.0030.00517.50
8.1.10.0040.00417.45
8.1.00.0000.00817.30
8.0.300.0050.00319.85
8.0.290.0000.00717.18
8.0.280.0030.00318.36
8.0.270.0000.00717.27
8.0.260.0030.00316.82
8.0.250.0040.00416.96
8.0.240.0060.00316.98
8.0.230.0030.00316.89
8.0.220.0000.00616.79
8.0.210.0000.00716.83
8.0.200.0030.00316.92
8.0.190.0030.00317.04
8.0.180.0040.00416.89
8.0.170.0000.00716.96
8.0.160.0030.00316.88
8.0.150.0040.00416.61
8.0.140.0050.00316.79
8.0.130.0040.00413.25
8.0.120.0000.00816.70
8.0.110.0000.00816.83
8.0.100.0050.00216.82
8.0.90.0040.00416.88
8.0.80.0110.00416.81
8.0.70.0040.00416.84
8.0.60.0040.00416.77
8.0.50.0050.00316.69
8.0.30.0060.01617.15
8.0.20.0130.00417.40
8.0.10.0030.00516.89
8.0.00.0090.01316.75
7.4.330.0050.00014.98
7.4.320.0000.00816.44
7.4.300.0000.00616.35
7.4.290.0030.00316.55
7.4.280.0030.00316.43
7.4.270.0080.00016.54
7.4.260.0030.00313.21
7.4.250.0030.00616.49
7.4.240.0000.00716.50
7.4.230.0070.00016.53
7.4.220.0090.00916.56
7.4.210.0060.00916.42
7.4.200.0040.00416.55
7.4.190.0040.00416.59
7.4.160.0130.01016.82
7.4.150.0110.01417.40
7.4.140.0110.00917.86
7.4.130.0130.00616.52
7.4.120.0070.01016.50
7.4.110.0090.00916.48
7.4.100.0030.01316.67
7.4.90.0090.00916.43
7.4.80.0080.01219.39
7.4.70.0110.01116.52
7.4.60.0070.01016.57
7.4.50.0050.00316.38
7.4.40.0070.00722.77
7.4.30.0030.01316.27
7.4.10.0110.00816.09
7.4.00.0080.00815.53
7.3.330.0020.00213.16
7.3.320.0000.00513.25
7.3.310.0030.00316.34
7.3.300.0070.00016.16
7.3.290.0070.01316.30
7.3.280.0100.00916.25
7.3.270.0000.01817.40
7.3.260.0120.00718.24
7.3.250.0080.01016.39
7.3.240.0120.00616.50
7.3.230.0070.01016.39
7.3.210.0070.01016.23
7.3.200.0030.01419.39
7.3.190.0140.00816.50
7.3.180.0120.00916.25
7.3.170.0190.00316.51
7.3.160.0060.01016.30
7.3.130.0160.00316.41
7.3.120.0040.01015.50
7.3.110.0130.00316.21
7.3.100.0080.00816.58
7.3.90.0140.00316.27
7.3.80.0070.00716.34
7.3.70.0070.01116.03
7.3.60.0000.01516.37
7.3.50.0070.00716.25
7.3.40.0030.01316.27
7.3.30.0030.00916.36
7.3.20.0060.00918.05
7.3.10.0050.00817.35
7.3.00.0020.01417.32
7.2.330.0090.00916.78
7.2.320.0120.00916.76
7.2.310.0160.00316.56
7.2.300.0100.01316.81
7.2.290.0110.00616.58
7.2.260.0100.01016.42
7.2.250.0070.01316.73
7.2.240.0130.00316.38
7.2.230.0070.01016.55
7.2.220.0000.01516.38
7.2.210.0030.00916.37
7.2.200.0060.01016.66
7.2.190.0030.01316.36
7.2.180.0060.00916.52
7.2.170.0100.00616.44
7.2.160.0000.01016.31
7.2.150.0060.00918.38
7.2.140.0060.00918.26
7.2.130.0080.00717.49
7.2.120.0050.00917.44
7.2.110.0050.01117.59
7.2.100.0080.00617.50
7.2.90.0060.00817.57
7.2.80.0090.00717.71
7.2.70.0070.00517.63
7.2.60.0090.00617.33
7.2.50.0070.00417.73
7.2.40.0050.01317.68
7.2.30.0030.00917.62
7.2.20.0030.00917.56
7.2.10.0020.00917.45
7.2.00.0050.00917.54
7.1.330.0080.00817.13
7.1.320.0060.01017.29
7.1.310.0070.00717.47
7.1.300.0040.01417.16
7.1.290.0030.01017.30
7.1.280.0070.00717.24
7.1.270.0070.00717.28
7.1.260.0090.00617.41
7.1.250.0030.01016.44
7.1.240.0050.00517.18
7.1.230.0060.00917.32
7.1.220.0090.00617.16
7.1.210.0060.00817.11
7.1.200.0060.00816.50
7.1.190.0000.01617.21
7.1.180.0040.00417.18
7.1.170.0060.00617.21
7.1.160.0040.01517.15
7.1.150.0070.00317.06
7.1.140.0030.00617.21
7.1.130.0090.00617.29
7.1.120.0100.01017.18
7.1.110.0070.01117.25
7.1.100.0060.00617.17
7.1.90.0060.00617.21
7.1.80.0060.00917.26
7.1.70.0070.00617.00
7.1.60.0070.00718.20
7.1.50.0130.00717.08
7.1.40.0040.01117.32
7.1.30.0040.00817.34
7.1.20.0000.01117.20
7.1.10.0060.00917.20
7.1.00.0050.02019.89
7.0.330.0080.00317.02
7.0.320.0120.00416.92
7.0.310.0030.01016.75
7.0.300.0080.00616.94
7.0.290.0060.01017.12
7.0.280.0060.00916.80
7.0.270.0070.00716.96
7.0.260.0060.01016.85
7.0.250.0110.00417.04
7.0.240.0070.00716.97
7.0.230.0030.01016.93
7.0.220.0110.00416.88
7.0.210.0090.00616.89
7.0.200.0060.00516.89
7.0.190.0070.01016.85
7.0.180.0040.01116.70
7.0.170.0080.00816.91
7.0.160.0030.00716.93
7.0.150.0030.01216.94
7.0.140.0030.04319.44
7.0.130.0070.01016.96
7.0.120.0060.00916.95
7.0.110.0110.00316.76
7.0.100.0080.04018.52
7.0.90.0120.02818.41
7.0.80.0050.03718.50
7.0.70.0220.04618.55
7.0.60.0030.03118.55
7.0.50.0100.03218.64
7.0.40.0070.02717.50
7.0.30.0060.04617.59
7.0.20.0080.04517.45
7.0.10.0070.04317.45
7.0.00.0060.03017.50
5.6.400.0110.00716.11
5.6.390.0040.00815.77
5.6.380.0060.00615.88
5.6.370.0070.00715.55
5.6.360.0050.00515.96
5.6.350.0100.00315.73
5.6.340.0060.00915.57
5.6.330.0030.01615.87
5.6.320.0060.00915.63
5.6.310.0040.00715.90
5.6.300.0120.00315.75
5.6.290.0060.01216.13
5.6.280.0090.03718.57
5.6.270.0060.00915.74
5.6.260.0060.00615.83
5.6.250.0050.04318.35
5.6.240.0050.04718.29
5.6.230.0090.03018.22
5.6.220.0120.02418.32
5.6.210.0100.04018.27
5.6.200.0030.04018.42
5.6.190.0060.04618.47
5.6.180.0060.04518.38
5.6.170.0050.04718.39
5.6.160.0050.04718.36
5.6.150.0030.02918.40
5.6.140.0100.04618.29
5.6.130.0120.04018.54
5.6.120.0030.04218.42
5.6.110.0100.03818.41
5.6.100.0020.02718.27
5.6.90.0020.04218.27
5.6.80.0020.04518.04
5.6.70.0090.03818.08
5.6.60.0050.04018.05
5.6.50.0100.04218.06
5.6.40.0140.03518.13
5.6.30.0080.03617.99
5.6.20.0050.04518.03
5.6.10.0070.02618.21
5.6.00.0030.04318.10
5.5.380.0080.03718.15
5.5.370.0080.03818.10
5.5.360.0100.04417.94
5.5.350.0110.03618.15
5.5.340.0070.04218.11
5.5.330.0080.04618.31
5.5.320.0080.03318.23
5.5.310.0100.04518.27
5.5.300.0090.03318.30
5.5.290.0080.02318.28
5.5.280.0040.03018.37
5.5.270.0040.03818.25
5.5.260.0090.04018.23
5.5.250.0050.04218.17
5.5.240.0030.03417.75
5.5.230.0050.04417.92
5.5.220.0060.03517.86
5.5.210.0080.04017.86
5.5.200.0110.03017.96
5.5.190.0080.04117.92
5.5.180.0060.03917.91
5.5.170.0090.00615.46
5.5.160.0090.02817.92
5.5.150.0030.03417.78
5.5.140.0070.03718.07
5.5.130.0060.03217.85
5.5.120.0080.03517.79
5.5.110.0020.03917.88
5.5.100.0050.04217.72
5.5.90.0060.02917.79
5.5.80.0050.04317.81
5.5.70.0140.03517.76
5.5.60.0130.03517.85
5.5.50.0050.02417.86
5.5.40.0100.03517.84
5.5.30.0050.04017.76
5.5.20.0080.03117.79
5.5.10.0050.04617.82
5.5.00.0090.03817.78
5.4.450.0070.02315.95
5.4.440.0050.03016.00
5.4.430.0030.02816.03
5.4.420.0030.02515.94
5.4.410.0070.02515.92
5.4.400.0030.03015.81
5.4.390.0050.04015.64
5.4.380.0050.02515.86
5.4.370.0090.02915.76
5.4.360.0030.04615.74
5.4.350.0090.03515.71
5.4.340.0020.04315.79
5.4.330.0090.00312.56
5.4.320.0080.01815.68
5.4.310.0060.03715.73
5.4.300.0030.03815.79
5.4.290.0080.02615.68
5.4.280.0020.02215.95
5.4.270.0080.03715.92
5.4.260.0020.02415.74
5.4.250.0020.04015.88
5.4.240.0030.03815.85
5.4.230.0020.04315.91
5.4.220.0060.04315.79
5.4.210.0040.03515.71
5.4.200.0030.03815.68
5.4.190.0020.04515.81
5.4.180.0040.03715.89
5.4.170.0050.03915.83
5.4.160.0150.03115.71
5.4.150.0060.04115.72
5.4.140.0080.02814.51
5.4.130.0090.03014.51
5.4.120.0030.02414.31
5.4.110.0090.03714.46
5.4.100.0050.03714.37
5.4.90.0050.04014.59
5.4.80.0050.02314.41
5.4.70.0110.02814.49
5.4.60.0070.03814.48
5.4.50.0090.03414.34
5.4.40.0070.03914.57
5.4.30.0080.02014.34
5.4.20.0050.04014.51
5.4.10.0030.02314.32
5.4.00.0050.04113.98
5.3.290.0040.04213.80
5.3.280.0100.02813.74
5.3.270.0100.03813.79
5.3.260.0050.04513.84
5.3.250.0030.04513.79
5.3.240.0080.02513.88
5.3.230.0120.02013.92
5.3.220.0070.03613.65
5.3.210.0020.03213.84
5.3.200.0100.03513.79
5.3.190.0020.04213.73
5.3.180.0060.03913.73
5.3.170.0070.03513.73
5.3.160.0030.03813.87
5.3.150.0030.03013.89
5.3.140.0060.04213.68
5.3.130.0030.02913.74
5.3.120.0060.03513.66
5.3.110.0060.04013.84
5.3.100.0030.02213.60
5.3.90.0040.03613.41
5.3.80.0050.03913.35
5.3.70.0070.02113.44
5.3.60.0030.04213.46
5.3.50.0080.03013.38
5.3.40.0030.02213.39
5.3.30.0100.03613.41
5.3.20.0080.03813.19
5.3.10.0050.02113.15
5.3.00.0060.04013.06
5.2.170.0030.05011.16
5.2.160.0070.06011.22
5.2.150.0030.06011.16
5.2.140.0030.03311.21
5.2.130.0030.06011.22
5.2.120.0070.05311.21
5.2.110.0130.04010.99
5.2.100.0030.05311.22
5.2.90.0100.05711.22
5.2.80.0070.05710.99
5.2.70.0130.02311.21
5.2.60.0100.03311.18
5.2.50.0030.03011.12
5.2.40.0030.02711.13
5.2.30.0030.03011.07
5.2.20.0030.06711.00
5.2.10.0070.05311.00
5.2.00.0000.05310.66
5.1.60.0030.05710.03
5.1.50.0070.0539.84
5.1.40.0070.05010.04
5.1.30.0030.05310.46
5.1.20.0070.04310.25
5.1.10.0030.0579.96
5.1.00.0000.0409.93
5.0.50.0030.0208.83
5.0.40.0030.0438.83
5.0.30.0030.0608.83
5.0.20.0000.0478.83
5.0.10.0000.0308.83
5.0.00.0000.0638.83
4.4.90.0000.0378.83
4.4.80.0030.0338.83
4.4.70.0030.0338.83
4.4.60.0030.0178.83
4.4.50.0000.0178.83
4.4.40.0000.0408.83
4.4.30.0000.0238.83
4.4.20.0000.0178.83
4.4.10.0000.0408.83
4.4.00.0000.0238.83
4.3.110.0000.0408.83
4.3.100.0030.0338.83
4.3.90.0070.0178.83
4.3.80.0030.0438.83
4.3.70.0000.0138.83
4.3.60.0000.0338.83
4.3.50.0030.0338.83
4.3.40.0000.0538.83
4.3.30.0000.0178.83
4.3.20.0000.0378.83
4.3.10.0000.0308.83
4.3.00.0030.0108.83

preferences:
43.41 ms | 401 KiB | 5 Q