3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private static $foo = 123; protected static function bar() { echo 'scope is: ', static::class, ' value of self::$foo is: ', self::$foo, PHP_EOL; } } class B extends A { private static $foo = 456; public static function bar() { $closure = self::getStaticInvoker('A', 'bar')->bindTo(null, B::class); $closure(); } private static function getStaticInvoker($className, $method) { return function (array $args) use ($className, $method) { return forward_static_call_array(array($className, $method), $args); }; } } B::bar();

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.0120.00616.63
8.3.50.0090.00917.89
8.3.40.0070.00718.97
8.3.30.0110.00718.70
8.3.20.0040.00420.20
8.3.10.0090.00023.65
8.3.00.0060.00319.38
8.2.180.0160.00617.00
8.2.170.0040.01122.96
8.2.160.0080.00620.29
8.2.150.0050.00324.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0030.00617.63
8.2.110.0060.00321.00
8.2.100.0030.00917.79
8.2.90.0080.00019.22
8.2.80.0000.00917.97
8.2.70.0030.00617.63
8.2.60.0030.00617.93
8.2.50.0050.00318.07
8.2.40.0040.00421.17
8.2.30.0000.00720.64
8.2.20.0080.00017.66
8.2.10.0050.00318.13
8.2.00.0040.00417.97
8.1.280.0140.00725.92
8.1.270.0050.00323.99
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0060.00319.13
8.1.230.0040.00817.66
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0040.00417.36
8.1.180.0040.00418.10
8.1.170.0060.00318.71
8.1.160.0030.00522.03
8.1.150.0050.00218.89
8.1.140.0040.00419.55
8.1.130.0040.00417.71
8.1.120.0070.00017.55
8.1.110.0060.00317.55
8.1.100.0040.00417.45
8.1.90.0000.00717.36
8.1.80.0030.00617.32
8.1.70.0030.00317.36
8.1.60.0040.00417.60
8.1.50.0000.00817.43
8.1.40.0040.00417.46
8.1.30.0050.00317.72
8.1.20.0000.00817.60
8.1.10.0040.00417.62
8.1.00.0000.00717.54
8.0.300.0070.00018.77
8.0.290.0030.00616.75
8.0.280.0040.00418.40
8.0.270.0000.00817.14
8.0.260.0030.00317.11
8.0.250.0000.00717.04
8.0.240.0040.00416.99
8.0.230.0030.00517.04
8.0.220.0000.00716.95
8.0.210.0060.00316.93
8.0.200.0040.00417.04
8.0.190.0040.00416.96
8.0.180.0070.00016.88
8.0.170.0000.00817.00
8.0.160.0000.00716.93
8.0.150.0030.00316.89
8.0.140.0070.00016.91
8.0.130.0030.00313.44
8.0.120.0040.00416.93
8.0.110.0000.00816.89
8.0.100.0050.00216.85
8.0.90.0000.00717.04
8.0.80.0090.00916.96
8.0.70.0040.00417.09
8.0.60.0030.00516.98
8.0.50.0000.00716.90
8.0.30.0100.00917.06
8.0.20.0110.00917.40
8.0.10.0050.00216.91
8.0.00.0080.00916.85
7.4.330.0000.00515.08
7.4.320.0030.00316.43
7.4.300.0000.00616.59
7.4.290.0040.00416.52
7.4.280.0000.00716.36
7.4.270.0000.01016.57
7.4.260.0050.00316.50
7.4.250.0070.00016.43
7.4.240.0040.00416.48
7.4.230.0000.00716.68
7.4.220.0100.01016.72
7.4.210.0060.01316.65
7.4.200.0040.00416.51
7.4.160.0080.00816.52
7.4.150.0090.00917.40
7.4.140.0070.01217.86
7.4.130.0130.00516.55
7.4.120.0090.00816.62
7.4.110.0060.01216.58
7.4.100.0090.00616.57
7.4.90.0100.01416.47
7.4.80.0110.00619.39
7.4.70.0130.00316.36
7.4.60.0070.01016.59
7.4.50.0040.00016.58
7.4.40.0130.00716.39
7.4.30.0100.01016.60
7.4.00.0140.00315.07
7.3.330.0000.00713.44
7.3.320.0030.00313.19
7.3.310.0030.00316.32
7.3.300.0000.00716.36
7.3.290.0130.00316.34
7.3.280.0070.00816.36
7.3.270.0090.00917.40
7.3.260.0120.00616.49
7.3.250.0060.01116.48
7.3.240.0090.01116.44
7.3.230.0070.01016.41
7.3.210.0130.00616.45
7.3.200.0060.00916.34
7.3.190.0100.00716.57
7.3.180.0070.01416.45
7.3.170.0070.01416.54
7.3.160.0000.01616.35
7.2.330.0100.00716.47
7.2.320.0100.00716.69
7.2.310.0080.01116.61
7.2.300.0060.00916.73
7.2.290.0110.01316.79
7.2.60.0070.00716.76
7.2.00.0050.00519.28
7.1.200.0040.00815.56
7.1.100.0140.00317.57
7.1.70.0000.00817.19
7.1.60.0130.01019.11
7.1.50.0090.00916.95
7.1.00.0070.07022.31
7.0.200.0100.00316.60
7.0.60.0000.04319.93
7.0.50.0030.04017.89
7.0.40.0070.06720.24
7.0.30.0230.04720.08
7.0.20.0230.05320.16
7.0.10.0330.08020.33
7.0.00.0070.08020.23
5.6.280.0030.07721.09
5.6.210.0100.08020.63
5.6.200.0070.06318.16
5.6.190.0070.07720.41
5.6.180.3770.03720.77
5.6.170.0370.05320.48
5.6.160.0100.07720.71
5.6.150.0030.04018.15
5.6.140.0070.04318.24
5.6.130.0030.04318.29
5.6.120.0100.05321.13
5.6.110.0200.06321.10
5.6.100.0100.08320.90
5.6.90.0070.08320.99
5.6.80.0130.06720.34
5.6.70.0170.08320.52
5.5.350.0100.07320.43
5.5.340.0070.08017.96
5.5.330.0100.08320.57
5.5.320.0230.07320.36
5.5.310.0300.07720.34
5.5.300.0030.07717.95
5.5.290.0170.08018.04
5.5.280.0130.07320.79
5.5.270.0030.06320.98
5.5.260.0070.07020.85
5.5.250.0100.07020.59
5.5.240.0070.03720.28
5.4.450.0200.07019.68
5.4.440.0100.08019.45
5.4.430.0200.05319.15
5.4.420.0270.06719.19
5.4.410.0200.06019.42
5.4.400.0330.06019.28
5.4.390.0230.05718.98
5.4.380.0300.04719.00
5.4.370.0100.06019.17
5.4.360.0300.07019.11
5.4.350.0200.05019.35
5.4.340.0100.06019.05
5.4.320.0270.05019.30
5.4.310.0130.05719.21
5.4.300.0230.04719.12
5.4.290.0300.06318.86
5.4.280.0200.07319.14
5.4.270.0200.05019.25
5.4.260.0270.05019.27
5.4.250.0230.04719.04
5.4.240.0200.04718.86
5.4.230.0100.06019.25
5.4.220.0330.06319.22
5.4.210.0130.05719.22
5.4.200.0270.04018.99
5.4.190.0100.06019.14
5.4.180.0330.04018.82
5.4.170.0300.04319.14
5.4.160.0270.04018.97
5.4.150.0070.07019.25
5.4.140.0200.05016.57
5.4.130.0200.05716.48
5.4.120.0270.04716.77
5.4.110.0270.04716.64
5.4.100.0100.06016.45
5.4.90.0230.04016.48
5.4.80.0270.05316.56
5.4.70.0300.06016.65
5.4.60.0300.04016.60
5.4.50.0300.04716.50
5.4.40.0200.04316.59
5.4.30.0200.04316.57
5.4.20.0100.05716.57
5.4.10.0170.05016.59
5.4.00.0130.06016.02

preferences:
58.76 ms | 401 KiB | 5 Q