3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A {protected $a = 'A'; /*public function __get($f){ return 'field_'.$f; }*/} class B extends A {} class C extends A { public function foo() { $b = new B(); echo $b->a; } } $c = new C(); $c->foo();
based on f2rFd

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.0.30.0080.01117.21
8.0.20.0100.01117.40
8.0.00.0120.00716.87
7.4.160.0030.01216.48
7.4.150.0090.00917.40
7.4.140.0110.00817.86
7.4.130.0110.00516.54
7.4.120.0110.00516.63
7.4.110.0040.01516.51
7.4.100.0090.01216.55
7.4.90.0120.00416.43
7.4.80.0140.00919.39
7.4.70.0150.00016.34
7.4.60.0060.01216.59
7.4.50.0040.00416.30
7.4.40.0190.00316.28
7.4.30.0100.00616.41
7.4.00.0080.00814.99
7.3.280.0100.00516.22
7.3.270.0060.01217.40
7.3.260.0120.01216.51
7.3.250.0140.00516.37
7.3.240.0100.01116.20
7.3.230.0070.01016.56
7.3.210.0100.00716.20
7.3.200.0160.00019.39
7.3.190.0080.00816.30
7.3.180.0130.00316.53
7.3.170.0100.01016.37
7.3.160.0060.01016.34
7.3.120.0080.01114.96
7.3.110.0060.00815.14
7.3.100.0090.00814.98
7.3.90.0070.00615.09
7.3.80.0080.00614.96
7.3.70.0050.00915.03
7.3.60.0050.00814.83
7.3.50.0060.00815.01
7.3.40.0030.00615.03
7.3.30.0060.00615.00
7.3.20.0070.00316.59
7.3.10.0070.00716.66
7.3.00.0050.01116.45
7.2.330.0200.03616.74
7.2.320.0100.01016.91
7.2.310.0110.01416.44
7.2.300.0100.01616.42
7.2.290.0030.01316.88
7.2.250.0020.01715.07
7.2.240.0100.00915.27
7.2.230.0020.01315.09
7.2.220.0060.00814.92
7.2.210.0080.01015.03
7.2.200.0070.00815.14
7.2.190.0060.00815.16
7.2.180.0050.00715.05
7.2.170.0080.00515.02
7.2.160.0030.01614.76
7.2.150.0060.01317.00
7.2.140.0040.01116.88
7.2.130.0040.01416.96
7.2.120.0030.00917.04
7.2.110.0030.01016.65
7.2.100.0070.00716.59
7.2.90.0110.00716.89
7.2.80.0030.01017.13
7.2.70.0060.00316.88
7.2.60.0050.01016.87
7.2.50.0030.01416.79
7.2.40.0040.01116.64
7.2.30.0070.00716.96
7.2.20.0000.00916.69
7.2.10.0030.01016.85
7.2.00.0050.00918.27
7.1.330.0050.01015.65
7.1.320.0040.01015.89
7.1.310.0060.00915.52
7.1.300.0010.00715.74
7.1.290.0060.00715.61
7.1.280.0050.00915.65
7.1.270.0050.00715.59
7.1.260.0030.01215.80
7.1.250.0090.00615.77
7.1.240.0030.00915.52
7.1.230.0000.01215.70
7.1.220.0070.00715.72
7.1.210.0140.00015.83
7.1.200.0060.00615.81
7.1.190.0070.00715.85
7.1.180.0080.00315.71
7.1.170.0130.00015.48
7.1.160.0030.00915.70
7.1.150.0000.01515.77
7.1.140.0060.00615.66
7.1.130.0040.00915.80
7.1.120.0110.00415.78
7.1.110.0000.01315.80
7.1.100.0080.00316.88
7.1.90.0030.00615.62
7.1.80.0000.00815.84
7.1.70.0000.01216.39
7.1.60.0070.01017.63
7.1.50.0020.01716.04
7.1.40.0000.01015.44
7.1.30.0070.00715.70
7.1.20.0090.00615.79
7.1.10.0070.00715.39
7.1.00.0060.04019.12
7.0.330.0070.00315.44
7.0.320.0040.00715.36
7.0.310.0030.00615.35
7.0.300.0000.01715.51
7.0.290.0000.01115.53
7.0.280.0030.00915.38
7.0.270.0000.01415.28
7.0.260.0030.01015.31
7.0.250.0080.00315.39
7.0.240.0030.01015.40
7.0.230.0000.01315.27
7.0.220.0030.00715.18
7.0.210.0000.01115.55
7.0.200.0090.00215.88
7.0.190.0030.00715.23
7.0.180.0000.01515.47
7.0.170.0100.00615.38
7.0.160.0060.00915.27
7.0.150.0100.00315.43
7.0.140.0040.02918.68
7.0.130.0060.00615.48
7.0.120.0070.01015.53
7.0.110.0040.00415.52
7.0.100.0030.00915.03
7.0.90.0150.00015.25
7.0.80.0030.01015.54
7.0.70.0050.00815.54
7.0.60.0060.02017.56
7.0.50.0060.02416.63
7.0.40.0120.03916.74
7.0.30.0100.03516.79
7.0.20.0260.03116.78
7.0.10.0050.04216.87
7.0.00.0040.03116.85
5.6.400.0070.00714.60
5.6.390.0060.00314.18
5.6.380.0030.01514.35
5.6.370.0070.00714.27
5.6.360.0140.00314.67
5.6.350.0040.00413.98
5.6.340.0030.00914.52
5.6.330.0060.00613.97
5.6.320.0000.01114.09
5.6.310.0140.00314.29
5.6.300.0080.00414.24
5.6.290.0000.00914.32
5.6.280.0060.04117.70
5.6.270.0000.01514.67
5.6.260.0030.01014.14
5.6.250.0100.00314.05
5.6.240.0070.00714.28
5.6.230.0030.00914.14
5.6.220.0000.01114.16
5.6.210.0050.04517.38
5.6.200.0030.03616.18
5.6.190.0050.03317.50
5.6.180.0020.03217.39
5.6.170.0150.04417.43
5.6.160.0080.02317.28
5.6.150.0060.04416.15
5.6.140.0020.03016.34
5.6.130.0070.03516.35
5.6.120.0050.05017.52
5.6.110.0090.02017.61
5.6.100.0100.04017.46
5.6.90.0040.04617.64
5.6.80.0050.02117.17
5.6.70.0100.00614.14
5.6.60.0000.01114.10
5.6.50.0060.00314.15
5.6.40.0000.01314.27
5.6.30.0000.00814.38
5.6.20.0000.01214.33
5.6.10.0040.00814.14
5.6.00.0080.00414.22
5.5.380.0030.01014.51
5.5.370.0000.00914.14
5.5.360.0030.01013.89
5.5.350.0150.04517.21
5.5.340.0100.01816.09
5.5.330.0060.02717.27
5.5.320.0070.02317.33
5.5.310.0160.02017.23
5.5.300.0060.03316.04
5.5.290.0030.03715.95
5.5.280.0030.03817.32
5.5.270.0030.04017.46
5.5.260.0070.03717.49
5.5.250.0100.04017.52
5.5.240.0050.03317.30
5.5.230.0030.00614.17
5.5.220.0000.00914.42
5.5.210.0100.00014.17
5.5.200.0090.00613.89
5.5.190.0090.00614.01
5.5.180.0060.01014.27
5.5.170.0030.01014.30
5.5.160.0040.00813.98
5.5.150.0040.00413.97
5.5.140.0100.00314.11
5.5.130.0030.00914.09
5.5.120.0000.01114.14
5.5.110.0060.00614.39
5.5.100.0030.01013.90
5.5.90.0070.00313.89
5.5.80.0060.00813.89
5.5.70.0100.00613.95
5.5.60.0040.01214.25
5.5.50.0030.00714.14
5.5.40.0030.01414.16
5.5.30.0040.00414.22
5.5.20.0040.01113.96
5.5.10.0110.00413.68
5.5.00.0000.01414.15
5.4.450.0070.03215.21
5.4.440.0450.03515.21
5.4.430.0640.02915.06
5.4.420.0420.03215.29
5.4.410.0470.03015.28
5.4.400.0450.02814.93
5.4.390.0380.03315.11
5.4.380.0030.03814.84
5.4.370.0070.03114.80
5.4.360.0100.03814.85
5.4.350.0200.02314.76
5.4.340.0100.03514.85
5.4.330.0000.00711.07
5.4.320.0140.02714.74
5.4.310.0150.02814.74
5.4.300.0120.04714.79
5.4.290.0170.02514.87
5.4.280.0030.03514.89
5.4.270.0200.02514.82
5.4.260.0180.02314.89
5.4.250.0180.02514.82
5.4.240.0120.03314.79
5.4.230.0180.02514.71
5.4.220.0170.02514.69
5.4.210.0050.03414.88
5.4.200.0130.02913.71
5.4.190.0070.03114.76
5.4.180.0120.02714.72
5.4.170.0150.02814.76
5.4.160.0080.03214.85
5.4.150.0080.03014.79
5.4.140.0130.02713.81
5.4.130.0060.03313.60
5.4.120.0050.03313.70
5.4.110.0120.02813.71
5.4.100.0140.02413.55
5.4.90.0120.02613.65
5.4.80.0050.03313.72
5.4.70.0080.03013.64
5.4.60.0120.02813.66
5.4.50.0120.02613.56
5.4.40.0100.02713.67
5.4.30.0130.02313.64
5.4.20.0080.03213.70
5.4.10.0100.02813.50
5.4.00.0120.02513.18
5.3.290.0230.04714.88
5.3.280.0230.04714.71
5.3.270.0100.06014.66
5.3.260.0070.06314.75
5.3.250.0200.04714.74
5.3.240.0100.05714.73
5.3.230.0100.06714.80
5.3.220.0130.05714.70
5.3.210.0130.08014.73
5.3.200.0130.05314.62
5.3.190.0200.04714.57
5.3.180.0170.05014.66
5.3.170.0230.04314.63
5.3.160.0270.04314.58
5.3.150.0100.06014.58
5.3.140.0170.07314.61
5.3.130.0130.05314.57
5.3.120.0130.05714.68
5.3.110.0130.06314.68
5.3.100.0100.05314.24
5.3.90.0100.05714.21
5.3.80.0170.04714.15
5.3.70.0130.06014.22
5.3.60.0070.05714.04
5.3.50.0000.06713.94
5.3.40.0170.05014.00
5.3.30.0200.05014.11
5.3.20.0130.05313.86
5.3.10.0130.05313.70
5.3.00.0370.03013.80
5.2.170.0130.04311.16
5.2.160.0130.04311.19
5.2.150.0100.04311.21
5.2.140.0130.04311.13
5.2.130.0170.03711.16
5.2.120.0170.03711.23
5.2.110.0230.03011.23
5.2.100.0070.04711.14
5.2.90.0130.04311.17
5.2.80.0170.05711.13
5.2.70.0170.03711.12
5.2.60.0030.05011.09
5.2.50.0200.03311.07
5.2.40.0100.04011.00
5.2.30.0170.03711.04
5.2.20.0100.04010.95
5.2.10.0070.04310.94
5.2.00.0070.04310.73
5.1.60.0100.03310.07
5.1.50.0100.03310.18
5.1.40.0200.02710.08
5.1.30.0100.03710.39
5.1.20.0100.03710.33
5.1.10.0070.04010.19
5.1.00.0130.03710.28
5.0.50.0100.0278.56
5.0.40.0130.0208.50
5.0.30.0070.0438.31
5.0.20.0000.0338.24
5.0.10.0030.0308.20
5.0.00.0030.0478.15
4.4.90.0100.0175.89
4.4.80.0030.0235.86
4.4.70.0070.0205.90
4.4.60.0030.0235.90
4.4.50.0030.0235.91
4.4.40.0070.0335.89
4.4.30.0100.0175.91
4.4.20.0070.0205.94
4.4.10.0070.0205.94
4.4.00.0030.0375.93
4.3.110.0100.0175.84
4.3.100.0130.0235.80
4.3.90.0070.0175.91
4.3.80.0130.0275.78
4.3.70.0030.0235.76
4.3.60.0070.0205.91
4.3.50.0070.0205.91
4.3.40.0070.0335.74
4.3.30.0030.0234.59
4.3.20.0070.0204.57
4.3.10.0000.0234.50
4.3.00.0230.02315.09