3v4l.org

run code in 300+ PHP versions simultaneously
l<?php function callStatic($class, $method, $args, $ref, $defined, $called) { var_dump($class, $defined, $called); $ref = new \ReflectionMethod($class, $method); $ref->setAccessible(true); return $ref->invokeArgs(null, array($args)); } class n_0d19ad5d1a89cbbf06a49f56e9dcb11d { public static function foo() { var_dump(get_called_class()); $a = function () { set_error_handler(function () { }); $called = get_called_class(); restore_error_handler(); return $called; }; var_dump($a()); return callStatic('static', 'bar', array(), array(), __CLASS__, call_user_func(function () { set_error_handler(function () { }); $called = get_called_class(); restore_error_handler(); return $called; })); } } class n_1c54f3f5b4e9e0fc521faa21fe127ad8 extends n_0d19ad5d1a89cbbf06a49f56e9dcb11d { protected static function bar() { return __CLASS__; } } echo callStatic('n_1c54f3f5b4e9e0fc521faa21fe127ad8', 'foo', array(), array(), __CLASS__, call_user_func(function () { set_error_handler(function () { }); $called = get_called_class(); restore_error_handler(); return $called; }));

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.0150.00618.43
8.3.50.0100.00821.98
8.3.40.0150.00018.86
8.3.30.0100.00320.29
8.3.20.0000.00720.35
8.3.10.0020.00521.97
8.3.00.0070.00022.29
8.2.180.0150.00018.44
8.2.170.0070.01022.96
8.2.160.0070.00720.57
8.2.150.0040.00424.18
8.2.140.0150.00424.66
8.2.130.0090.00926.16
8.2.120.0040.00419.49
8.2.110.0030.00622.25
8.2.100.0030.00919.47
8.2.90.0060.00319.08
8.2.80.0040.00419.32
8.2.70.0040.00417.50
8.2.60.0000.00817.93
8.2.50.0030.00618.07
8.2.40.0000.00818.16
8.2.30.0060.00318.08
8.2.20.0070.00017.68
8.2.10.0040.00417.77
8.2.00.0000.00817.71
8.1.280.0140.00725.92
8.1.270.0040.01520.27
8.1.260.0080.00026.35
8.1.250.0000.00728.09
8.1.240.0100.00023.71
8.1.230.0110.00019.11
8.1.220.0080.00017.74
8.1.210.0030.00518.77
8.1.200.0000.00917.22
8.1.190.0050.00317.51
8.1.180.0030.00618.79
8.1.170.0030.00518.50
8.1.160.0020.00522.20
8.1.150.0040.00418.59
8.1.140.0000.00717.41
8.1.130.0000.00717.84
8.1.120.0030.00517.33
8.1.110.0000.00717.39
8.1.100.0000.00717.44
8.1.90.0000.00817.46
8.1.80.0060.00317.40
8.1.70.0040.00417.34
8.1.60.0000.00917.53
8.1.50.0080.00017.53
8.1.40.0050.00517.34
8.1.30.0040.00417.46
8.1.20.0000.00917.63
8.1.10.0040.00417.55
8.1.00.0060.00317.48
8.0.300.0070.00018.77
8.0.290.0040.00417.16
8.0.280.0080.00018.35
8.0.270.0040.00417.23
8.0.260.0000.00716.92
8.0.250.0070.00016.95
8.0.240.0050.00216.88
8.0.230.0030.00317.00
8.0.220.0030.00316.94
8.0.210.0070.00016.96
8.0.200.0000.00617.03
8.0.190.0050.00317.04
8.0.180.0050.00216.93
8.0.170.0030.00517.00
8.0.160.0040.00416.96
8.0.150.0000.00716.87
8.0.140.0040.00416.88
8.0.130.0060.00013.49
8.0.120.0030.00516.84
8.0.110.0040.00417.00
8.0.100.0040.00416.86
8.0.90.0000.00816.84
8.0.80.0060.01317.08
8.0.70.0050.00316.77
8.0.60.0070.00017.04
8.0.50.0000.00717.09
8.0.30.0130.00617.08
8.0.20.0150.00417.40
8.0.10.0040.00416.92
8.0.00.0060.01216.71
7.4.330.0030.00315.00
7.4.320.0030.00316.47
7.4.300.0070.00016.43
7.4.290.0070.00016.62
7.4.280.0030.00316.63
7.4.270.0000.00716.55
7.4.260.0040.00316.63
7.4.250.0040.00416.59
7.4.240.0000.00716.51
7.4.230.0000.00816.66
7.4.220.0060.01216.44
7.4.210.0050.00916.53
7.4.200.0070.00016.73
7.4.190.0030.00316.48
7.4.160.0160.00616.50
7.4.150.0140.00317.40
7.4.140.0090.01117.86
7.4.130.0130.00516.58
7.4.120.0090.00916.47
7.4.110.0100.00716.30
7.4.100.0110.01116.68
7.4.90.0110.01116.82
7.4.80.0150.00919.39
7.4.70.0130.00716.57
7.4.60.0100.00716.43
7.4.50.0030.00616.63
7.4.40.0000.01522.77
7.4.30.0120.00916.77
7.4.10.0070.01114.65
7.4.00.0040.01314.99
7.3.330.0030.00313.31
7.3.320.0000.00513.32
7.3.310.0030.00316.50
7.3.300.0000.00716.41
7.3.290.0070.00716.38
7.3.280.0080.00816.42
7.3.270.0070.01017.40
7.3.260.0090.01216.51
7.3.250.0050.01816.46
7.3.240.0070.01016.56
7.3.230.0030.01416.41
7.3.210.0060.01016.59
7.3.200.0070.01419.39
7.3.190.0170.00716.58
7.3.180.0060.00916.47
7.3.170.0090.01016.59
7.3.160.0110.00716.43
7.3.130.0100.00614.89
7.3.120.0080.00914.99
7.3.110.0100.00814.85
7.3.100.0100.00714.79
7.3.90.0060.00814.90
7.3.80.0050.00614.81
7.3.70.0070.00514.88
7.3.60.0050.00814.82
7.3.50.0090.00714.89
7.3.40.0070.00614.74
7.3.30.0020.01114.79
7.3.20.0030.01016.71
7.3.10.0060.00516.55
7.3.00.0050.00916.55
7.2.330.0060.01216.77
7.2.320.0060.01416.79
7.2.310.0130.00916.89
7.2.300.0060.01016.81
7.2.290.0120.00616.77
7.2.260.0060.01215.14
7.2.250.0030.01315.18
7.2.240.0110.00814.84
7.2.230.0060.01015.12
7.2.220.0060.00814.88
7.2.210.0030.00915.17
7.2.200.0070.00515.05
7.2.190.0110.00314.81
7.2.180.0060.00715.10
7.2.170.0070.00714.94
7.2.160.0120.00314.75
7.2.150.0090.00616.95
7.2.140.0060.00616.82
7.2.130.0110.00416.93
7.2.120.0030.00917.03
7.2.110.0030.00716.94
7.2.100.0040.01117.00
7.2.90.0110.00416.68
7.2.80.0070.00316.98
7.2.70.0040.01216.72
7.2.60.0120.00716.90
7.2.50.0080.00716.99
7.2.40.0040.01116.93
7.2.30.0080.00416.82
7.2.20.0000.01916.88
7.2.10.0060.00616.96
7.2.00.0020.01018.12
7.1.330.0090.00515.82
7.1.320.0050.00815.54
7.1.310.0010.01115.90
7.1.300.0050.00915.97
7.1.290.0020.00915.56
7.1.280.0030.00815.64
7.1.270.0070.00715.81
7.1.260.0080.00815.63
7.1.250.0070.00315.55
7.1.240.0090.00615.61
7.1.230.0080.00415.89
7.1.220.0070.01015.61
7.1.210.0060.00615.69
7.1.200.0040.00515.66
7.1.190.0070.01015.75
7.1.180.0030.01315.69
7.1.170.0030.00916.02
7.1.160.0040.01115.79
7.1.150.0000.00815.57
7.1.140.0060.00915.82
7.1.130.0060.01215.68
7.1.120.0070.00715.71
7.1.110.0070.00315.87
7.1.100.0080.00415.78
7.1.90.0000.01515.82
7.1.80.0040.01115.84
7.1.70.0070.00316.43
7.1.60.0070.00616.32
7.1.50.0060.01316.34
7.1.40.0050.00315.82
7.1.30.0000.00815.66
7.1.20.0000.01215.92
7.1.10.0120.00315.65
7.1.00.0090.03519.08
7.0.330.0040.01115.54
7.0.320.0100.00015.52
7.0.310.0100.00315.21
7.0.300.0100.00615.29
7.0.290.0000.01215.42
7.0.280.0080.00415.44
7.0.270.0040.00415.30
7.0.260.0070.00715.44
7.0.250.0080.00615.37
7.0.240.0100.00315.57
7.0.230.0030.01015.48
7.0.220.0030.00915.53
7.0.210.0000.01015.50
7.0.200.0060.00816.10
7.0.190.0060.00915.53
7.0.180.0070.00715.41
7.0.170.0030.01315.50
7.0.160.0040.01115.39
7.0.150.0090.00315.44
7.0.140.0090.03918.77
7.0.130.0040.01215.59
7.0.120.0060.00915.57
7.0.110.0030.00915.55
7.0.100.0060.00615.51
7.0.90.0100.00315.32
7.0.80.0090.00315.52
7.0.70.0080.00315.58
7.0.60.0120.03917.73
7.0.50.0100.03316.64
7.0.40.0050.05116.88
7.0.30.0140.02916.65
7.0.20.0170.04116.94
7.0.10.0120.02516.75
7.0.00.0040.02516.92
5.6.400.0070.00414.55
5.6.390.0040.00814.68
5.6.380.0070.00714.28
5.6.370.0040.00914.38
5.6.360.0060.00614.48
5.6.350.0030.01014.25
5.6.340.0060.00914.59
5.6.330.0000.01414.65
5.6.320.0000.01414.33
5.6.310.0030.01014.67
5.6.300.0000.01314.39
5.6.290.0060.00314.36
5.6.280.0050.03917.62
5.6.270.0000.01214.28
5.6.260.0030.00614.67
5.6.250.0030.01014.28
5.6.240.0110.00014.45
5.6.230.0060.00614.40
5.6.220.0070.00814.21
5.6.210.0050.04817.59
5.6.200.0050.02516.16
5.6.190.0100.04317.41
5.6.180.1780.02817.46
5.6.170.0230.03617.52
5.6.160.0120.02517.51
5.6.150.0090.03616.29
5.6.140.0070.04516.43
5.6.130.0070.03716.38
5.6.120.0050.02517.75
5.6.110.0150.04217.49
5.6.100.0080.04217.67
5.6.90.0000.03017.69
5.6.80.0050.04817.24
5.6.70.0170.03717.27
5.6.60.0060.00614.38
5.6.50.0040.01214.13
5.6.40.0050.00514.24
5.6.30.0090.00014.32
5.6.20.0070.00714.37
5.6.10.0070.00714.15
5.6.00.0090.00614.23
5.5.380.0070.00714.36
5.5.370.0000.00914.13
5.5.360.0070.01014.05
5.5.350.0100.04217.33
5.5.340.0050.02316.15
5.5.330.0060.04217.22
5.5.320.0070.03117.32
5.5.310.0180.04017.27
5.5.300.0000.03116.06
5.5.290.0050.04616.16
5.5.280.0070.04517.58
5.5.270.0110.04017.46
5.5.260.0100.02817.33
5.5.250.0100.02517.39
5.5.240.0110.03817.14
5.5.230.0070.00714.32
5.5.220.0100.00614.02
5.5.210.0110.00314.57
5.5.200.0000.01414.19
5.5.190.0000.00914.10
5.5.180.0030.01013.99
5.5.170.0040.01114.09
5.5.160.0090.00614.39
5.5.150.0080.00814.33
5.5.140.0070.00414.30
5.5.130.0060.01014.16
5.5.120.0090.00614.34
5.5.110.0040.00814.09
5.5.100.0060.00314.28
5.5.90.0000.01214.31
5.5.80.0150.00014.06
5.5.70.0040.01414.08
5.5.60.0000.01313.75
5.5.50.0000.00914.00
5.5.40.0100.00714.18
5.5.30.0000.01614.09
5.5.20.0030.01014.12
5.5.10.0070.00713.98
5.5.00.0040.01214.35
5.4.450.0420.04615.45
5.4.440.0370.03415.46
5.4.430.0520.03815.45
5.4.420.0420.02315.39
5.4.410.0290.03115.26
5.4.400.0080.03015.09
5.4.390.0600.03515.06
5.4.380.0130.03415.06
5.4.370.0100.02915.04
5.4.360.0080.03214.92
5.4.350.0040.02111.67
5.4.340.0070.02011.67
5.4.330.0090.00311.31
5.4.320.0060.02311.92
5.4.310.0060.02311.92
5.4.300.0050.02411.92
5.4.290.0090.02411.92
5.4.280.0080.02311.87
5.4.270.0070.02111.87
5.4.260.0060.02111.87
5.4.250.0090.03215.14
5.4.240.0070.02815.21
5.4.230.0100.03615.15
5.4.220.0050.03115.05
5.4.210.0100.02815.17
5.4.200.0120.03015.13
5.4.190.0070.03115.15
5.4.180.0100.02915.15
5.4.170.0110.03515.16
5.4.160.0120.02515.13
5.4.150.0080.04115.12
5.4.140.0070.03213.86
5.4.130.0050.03213.83
5.4.120.0120.03013.83
5.4.110.0110.02513.93
5.4.100.0060.02813.87
5.4.90.0050.02714.01
5.4.80.0120.02213.92
5.4.70.0030.03013.86
5.4.60.0020.03213.90
5.4.50.0130.02513.85
5.4.40.0060.02913.96
5.4.30.0050.03713.93
5.4.20.0100.02713.90
5.4.10.0070.03113.90
5.4.00.0080.03313.64
5.3.290.0060.02212.05
5.3.280.0050.02813.06
5.3.270.0050.03913.01
5.3.260.0080.03312.93
5.3.250.0110.03113.02
5.3.240.0150.03313.02
5.3.230.0050.03012.97
5.3.220.0050.03113.00
5.3.210.0100.02513.00
5.3.200.0100.03312.96
5.3.190.0050.02713.00
5.3.180.0020.03512.87
5.3.170.0030.02913.04
5.3.160.0030.03313.00
5.3.150.0070.02713.02
5.3.140.0140.03212.95
5.3.130.0100.04012.95
5.3.120.0000.03413.04
5.3.110.0030.03513.02
5.3.100.0100.03212.69
5.3.90.0130.02712.67
5.3.80.0050.04012.72
5.3.70.0070.03712.71
5.3.60.0070.03512.76
5.3.50.0050.03912.64
5.3.40.0100.03012.65
5.3.30.0080.02612.62
5.3.20.0030.02812.56
5.3.10.0050.02812.48
5.3.00.0030.03412.48
5.2.170.0130.05011.21
5.2.160.0130.03711.23
5.2.150.0030.04711.10
5.2.140.0130.04011.22
5.2.130.0030.04311.06
5.2.120.0030.06010.93
5.2.110.0100.03311.07
5.2.100.0130.03711.27
5.2.90.0100.03711.09
5.2.80.0030.04311.18
5.2.70.0070.05011.19
5.2.60.0070.04011.13
5.2.50.0130.03310.95
5.2.40.0070.03711.00
5.2.30.0000.04311.16
5.2.20.0070.05711.03
5.2.10.0100.03310.95
5.2.00.0030.04010.73
5.1.60.0000.05710.00
5.1.50.0100.03010.00
5.1.40.0100.03010.14
5.1.30.0200.02710.42
5.1.20.0030.04310.53
5.1.10.0000.04310.27
5.1.00.0130.0279.99
5.0.50.0000.0338.61
5.0.40.0030.0278.41
5.0.30.0070.0408.29
5.0.20.0100.0308.30
5.0.10.0030.0278.16
5.0.00.0030.0438.23
4.4.90.0100.0137.30
4.4.80.0030.0207.30
4.4.70.0000.0237.30
4.4.60.0070.0177.30
4.4.50.0000.0337.30
4.4.40.0100.0277.30
4.4.30.0030.0207.30
4.4.20.0000.0237.30
4.4.10.0070.0177.30
4.4.00.0030.0307.30
4.3.110.0000.0237.30
4.3.100.0070.0207.30
4.3.90.0030.0207.30
4.3.80.0000.0477.30
4.3.70.0030.0277.30
4.3.60.0000.0237.30
4.3.50.0000.0237.30
4.3.40.0030.0307.30
4.3.30.0030.0277.30
4.3.20.0000.0237.30
4.3.10.0030.0207.30
4.3.00.0130.0276.66

preferences:
46.05 ms | 401 KiB | 5 Q