3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Base { public static function noClosure() { echo 'Context of '.get_called_class().', no closure: '; echo Left::$prot; echo "\n"; } public static function withClosure() { echo 'Context of '.get_called_class().', with closure: '; $cl = function(){ echo Left::$prot; echo "\n"; }; $cl(); } } class Left extends Base { protected static $prot = 'works.'; } class Right extends Base { public static function direct() { echo 'Directly from Right: '; echo Left::$prot; echo "\n"; } } Right::direct(); Base::noClosure(); Right::noClosure(); Base::withClosure(); Right::withClosure();

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.0130.00718.68
8.3.50.0110.00922.04
8.3.40.0070.01418.83
8.3.30.0000.01419.09
8.3.20.0040.00420.16
8.3.10.0080.00020.44
8.3.00.0000.00819.25
8.2.180.0120.00318.43
8.2.170.0040.01122.96
8.2.160.0110.00420.39
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0050.00322.22
8.2.110.0060.00320.70
8.2.100.0040.00718.16
8.2.90.0040.00419.03
8.2.80.0000.00817.97
8.2.70.0000.00817.63
8.2.60.0060.00317.90
8.2.50.0080.00018.07
8.2.40.0040.00418.16
8.2.30.0000.00719.29
8.2.20.0030.00617.69
8.2.10.0000.00817.98
8.2.00.0030.00617.75
8.1.280.0120.00625.92
8.1.270.0080.00023.82
8.1.260.0070.00026.35
8.1.250.0030.00628.09
8.1.240.0060.00323.84
8.1.230.0040.00819.15
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0030.00617.23
8.1.190.0060.00317.10
8.1.180.0000.00818.10
8.1.170.0070.00018.58
8.1.160.0050.00322.07
8.1.150.0040.00418.78
8.1.140.0070.00017.34
8.1.130.0040.00417.80
8.1.120.0040.00417.35
8.1.110.0020.00517.23
8.1.100.0000.00717.34
8.1.90.0070.00017.28
8.1.80.0070.00017.29
8.1.70.0030.00317.31
8.1.60.0060.00317.42
8.1.50.0060.00317.51
8.1.40.0040.00417.48
8.1.30.0050.00317.57
8.1.20.0060.00317.61
8.1.10.0000.00717.43
8.1.00.0040.00417.31
8.0.300.0050.00318.77
8.0.290.0000.00816.75
8.0.280.0000.00718.45
8.0.270.0000.00717.34
8.0.260.0060.00017.33
8.0.250.0030.00317.03
8.0.240.0000.00717.00
8.0.230.0070.00017.04
8.0.220.0030.00316.81
8.0.210.0000.00816.93
8.0.200.0070.00016.99
8.0.190.0000.00717.02
8.0.180.0040.00416.95
8.0.170.0000.00716.89
8.0.160.0000.00716.98
8.0.150.0070.00016.76
8.0.140.0040.00416.86
8.0.130.0030.00313.43
8.0.120.0000.00716.75
8.0.110.0000.00716.91
8.0.100.0040.00416.89
8.0.90.0040.00416.92
8.0.80.0040.01116.86
8.0.70.0040.00416.87
8.0.60.0050.00216.91
8.0.50.0000.00817.02
8.0.30.0120.00716.99
8.0.20.0120.01517.40
8.0.10.0070.00017.02
8.0.00.0110.00616.81
7.4.330.0000.00515.08
7.4.320.0040.00416.56
7.4.300.0030.00316.43
7.4.290.0000.00716.57
7.4.280.0040.00416.30
7.4.270.0000.00716.57
7.4.260.0000.00616.45
7.4.250.0000.00716.44
7.4.240.0030.00416.47
7.4.230.0070.00016.54
7.4.220.0120.00616.57
7.4.210.0090.00616.33
7.4.200.0000.00716.36
7.4.160.0100.00716.54
7.4.150.0090.00917.40
7.4.140.0120.01017.86
7.4.130.0100.00816.52
7.4.120.0060.01416.53
7.4.110.0070.01016.48
7.4.100.0110.00716.68
7.4.90.0070.01116.51
7.4.80.0150.00819.37
7.4.70.0100.00616.31
7.4.60.0130.00316.47
7.4.50.0080.00016.59
7.4.40.0110.00616.52
7.4.30.0080.00816.67
7.4.00.0100.00314.91
7.3.330.0000.00613.39
7.3.320.0000.00513.36
7.3.310.0030.00316.27
7.3.300.0000.00616.34
7.3.290.0150.00016.39
7.3.280.0100.00816.41
7.3.270.0070.01417.40
7.3.260.0110.01216.55
7.3.250.0130.00516.50
7.3.240.0080.00816.42
7.3.230.0080.00816.39
7.3.210.0160.00016.41
7.3.200.0110.00719.39
7.3.190.0110.00516.39
7.3.180.0120.00416.39
7.3.170.0110.00516.52
7.3.160.0120.01216.43
7.3.10.0070.00716.39
7.3.00.0100.00316.59
7.2.330.0070.01116.62
7.2.320.0070.01016.75
7.2.310.0090.01416.78
7.2.300.0150.00616.75
7.2.290.0130.01616.45
7.2.130.0100.00016.83
7.2.120.0070.00716.76
7.2.110.0030.00916.77
7.2.100.0070.00316.88
7.2.90.0000.01816.95
7.2.80.0030.00916.88
7.2.70.0030.00716.93
7.2.60.0070.00916.93
7.2.50.0060.00916.73
7.2.40.0090.00316.85
7.2.30.0090.00616.88
7.2.20.0030.00716.86
7.2.10.0060.00616.66
7.2.00.0040.01218.22
7.1.250.0030.01015.77
7.1.200.0040.01115.77
7.1.100.0040.00717.75
7.1.70.0000.00716.99
7.1.60.0070.01719.32
7.1.50.0060.01516.43
7.1.00.0000.08022.31
7.0.200.0030.00616.63
7.0.140.0070.07022.12
7.0.60.0070.07720.01
7.0.50.0030.06317.85
7.0.40.0100.07720.11
7.0.30.0200.04020.23
7.0.20.0130.05720.12
7.0.10.0170.08320.06
7.0.00.0130.08320.16
5.6.280.0100.06721.14
5.6.210.0030.04720.67
5.6.200.0100.04318.24
5.6.190.0030.05720.48
5.6.180.0200.04320.39
5.6.170.0230.08020.50
5.6.160.0070.05720.55
5.6.150.0100.03318.15
5.6.140.0170.06718.18
5.6.130.0070.08018.18
5.6.120.0100.06720.96
5.6.110.0130.08320.97
5.6.100.0230.07021.15
5.6.90.0100.08020.86
5.6.80.0130.05020.39
5.5.350.0200.08020.45
5.5.340.0100.08318.07
5.5.330.0100.04720.31
5.5.320.0470.06020.44
5.5.310.0300.05020.34
5.5.300.0030.07717.95
5.5.290.0070.08318.04
5.5.280.0130.07320.78
5.5.270.0000.04720.85
5.5.260.0130.07320.84
5.5.250.0070.08720.61
5.5.240.0130.02720.27
5.4.450.0300.07719.48
5.4.440.0330.03019.32
5.4.430.0330.07019.48
5.4.420.0300.04319.52
5.4.410.0230.04019.39
5.4.400.0270.07319.20
5.4.390.0270.04719.31
5.4.380.0430.03718.98
5.4.370.0230.05318.86
5.4.360.0330.06719.14
5.4.350.0300.07319.29
5.4.340.0230.05019.09
5.4.320.0300.05718.86
5.4.310.0330.04319.22
5.4.300.0300.06718.99
5.4.290.0230.05019.06
5.4.280.0270.07719.22
5.4.270.0300.06719.20
5.4.260.0370.06719.19
5.4.250.0330.05319.21
5.4.240.0300.06719.20
5.4.230.0300.07319.07
5.4.220.0300.05719.15
5.4.210.0400.06018.85
5.4.200.0330.06719.21
5.4.190.0270.07719.21
5.4.180.0300.07018.84
5.4.170.0270.05319.31
5.4.160.0330.06319.20
5.4.150.0270.04019.21
5.4.140.0370.06016.56
5.4.130.0370.06016.40
5.4.120.0230.05316.33
5.4.110.0300.07316.23
5.4.100.0300.04716.40
5.4.90.0430.02716.59
5.4.80.0270.07316.54
5.4.70.0230.04016.49
5.4.60.0330.06016.23
5.4.50.0300.06716.52
5.4.40.0400.05716.24
5.4.30.0300.05016.48
5.4.20.0200.04316.55
5.4.10.0200.08016.55
5.4.00.0300.05015.80
5.3.290.0300.07014.68
5.3.280.0370.06314.63
5.3.270.0270.04314.70
5.3.260.0230.04714.69
5.3.250.0270.07714.63
5.3.240.0400.06314.59
5.3.230.0370.05314.52
5.3.220.0300.06714.64
5.3.210.0300.07714.66
5.3.200.0230.05714.47
5.3.190.0270.07014.47
5.3.180.0330.06714.56
5.3.170.0430.05714.59
5.3.160.0430.06014.49
5.3.150.0270.05314.66
5.3.140.0300.07314.54
5.3.130.0230.05014.63
5.3.120.0270.05714.61
5.3.110.0270.04714.71
5.3.100.0270.07314.20
5.3.90.0430.06013.94
5.3.80.0300.06313.94
5.3.70.0330.07014.11
5.3.60.0300.06014.23
5.3.50.0330.07013.87
5.3.40.0330.06013.90
5.3.30.0370.06013.93
5.3.20.0230.04713.61
5.3.10.0300.06713.89
5.3.00.0270.06713.73
5.2.170.0200.04711.87
5.2.160.0270.06311.87
5.2.150.0270.05711.87
5.2.140.0230.03711.87
5.2.130.0270.05711.87
5.2.120.0330.05011.87
5.2.110.0170.05711.87
5.2.100.0170.04311.87
5.2.90.0200.05311.87
5.2.80.0230.03711.87
5.2.70.0270.03311.87
5.2.60.0270.04311.87
5.2.50.0200.03311.87
5.2.40.0330.04711.87
5.2.30.0230.05311.87
5.2.20.0170.04711.87
5.2.10.0200.06011.87
5.2.00.0200.04711.87
5.1.60.0230.02711.87
5.1.50.0170.03011.87
5.1.40.0170.04711.87
5.1.30.0200.03311.87
5.1.20.0230.05311.87
5.1.10.0230.05011.87
5.1.00.0170.03311.87
5.0.50.0100.02311.87
5.0.40.0100.04311.87
5.0.30.0170.05011.87
5.0.20.0130.04011.87
5.0.10.0130.02711.87
5.0.00.0200.05311.87
4.4.90.0100.03711.87
4.4.80.0130.03011.87
4.4.70.0070.02011.87
4.4.60.0100.03311.87
4.4.50.0130.02011.87
4.4.40.0130.02311.87
4.4.30.0130.03011.87
4.4.20.0100.02711.87
4.4.10.0070.02011.87
4.4.00.0100.02311.87
4.3.110.0130.03711.87
4.3.100.0130.02711.87
4.3.90.0130.02011.87
4.3.80.0130.04711.87
4.3.70.0100.03011.87
4.3.60.0070.01711.87
4.3.50.0070.03711.87
4.3.40.0170.02711.87
4.3.30.0000.02311.87
4.3.20.0030.02311.87
4.3.10.0030.02311.87
4.3.00.0030.04011.87

preferences:
48.91 ms | 401 KiB | 5 Q