3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { const BAZ = 37; public static function f() { return static function () { var_dump(static::BAZ); var_dump(static::class); }; } } class B { const BAZ = 42; } $f = A::f(); $f(); $g = $f->bindTo(null, B::class); $g(); $foo = static function () { var_dump(static::BAZ); //var_dump(static::class); // line 21 is here }; $bar = $foo->bindTo(null, A::class); $bar(); $foo->bindTo(null, B::class)();

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.0090.00618.55
8.3.50.0110.00721.15
8.3.40.0140.00718.81
8.3.30.0140.00319.10
8.3.20.0070.00720.16
8.3.10.0080.00021.92
8.3.00.0040.00422.51
8.2.180.0090.00918.29
8.2.170.0100.01022.96
8.2.160.0000.01619.04
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0060.00926.16
8.2.120.0040.00419.54
8.2.110.0060.00322.25
8.2.100.0060.00617.72
8.2.90.0040.00419.05
8.2.80.0050.00317.97
8.2.70.0000.00817.63
8.2.60.0040.00417.90
8.2.50.0040.00418.10
8.2.40.0000.00820.41
8.2.30.0030.00819.17
8.2.20.0040.00417.56
8.2.10.0000.00717.73
8.2.00.0050.00517.68
8.1.280.0090.01525.92
8.1.270.0080.00018.58
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0040.00419.13
8.1.230.0040.00720.31
8.1.220.0020.00517.74
8.1.210.0030.00518.77
8.1.200.0030.00617.35
8.1.190.0030.00617.23
8.1.180.0090.00018.10
8.1.170.0060.00318.50
8.1.160.0040.00418.81
8.1.150.0040.00420.02
8.1.140.0040.00417.35
8.1.130.0000.00717.74
8.1.120.0040.00417.45
8.1.110.0030.00417.32
8.1.100.0040.00417.29
8.1.90.0040.00417.43
8.1.80.0000.00717.48
8.1.70.0070.00017.45
8.1.60.0060.00317.48
8.1.50.0030.00517.41
8.1.40.0030.00517.56
8.1.30.0040.00417.61
8.1.20.0050.00317.61
8.1.10.0040.00417.48
8.1.00.0070.00717.41
8.0.300.0060.00318.77
8.0.290.0000.00816.63
8.0.280.0000.00718.36
8.0.270.0000.00717.27
8.0.260.0030.00316.84
8.0.250.0030.00316.95
8.0.240.0080.00016.93
8.0.230.0000.00716.83
8.0.220.0040.00416.80
8.0.210.0000.00716.87
8.0.200.0060.00017.01
8.0.190.0000.00816.87
8.0.180.0040.00416.94
8.0.170.0000.00816.91
8.0.160.0000.00816.96
8.0.150.0070.00016.87
8.0.140.0000.00816.85
8.0.130.0060.00013.29
8.0.120.0040.00416.75
8.0.110.0020.00516.85
8.0.100.0030.00516.89
8.0.90.0030.00516.76
8.0.80.0040.01116.93
8.0.70.0000.00716.96
8.0.60.0040.00416.76
8.0.50.0000.00816.71
8.0.30.0120.00817.18
8.0.20.0130.00617.40
8.0.10.0000.00716.91
8.0.00.0090.01016.66
7.4.330.0000.00415.00
7.4.320.0060.00016.49
7.4.300.0000.00616.53
7.4.290.0030.00316.59
7.4.280.0070.00316.53
7.4.270.0020.00516.43
7.4.260.0030.00316.58
7.4.250.0040.00416.48
7.4.240.0020.00616.50
7.4.230.0050.00216.43
7.4.220.0040.01216.50
7.4.210.0070.00816.53
7.4.200.0050.00216.58
7.4.190.0000.00816.42
7.4.160.0080.00816.43
7.4.150.0120.00617.40
7.4.140.0070.01217.86
7.4.130.0110.00816.50
7.4.120.0100.00816.54
7.4.110.0140.01016.30
7.4.100.0070.01016.53
7.4.90.0070.01016.45
7.4.80.0120.00619.39
7.4.70.0150.00316.40
7.4.60.0110.01016.26
7.4.50.0000.00816.20
7.4.40.0070.00722.77
7.4.30.0000.01716.70
7.4.00.0030.01415.09
7.3.330.0000.00513.29
7.3.320.0050.00013.26
7.3.310.0030.00316.35
7.3.300.0030.00316.17
7.3.290.0060.01316.30
7.3.280.0040.01216.33
7.3.270.0030.01317.40
7.3.260.0060.01516.64
7.3.250.0070.00916.37
7.3.240.0080.00816.26
7.3.230.0140.00316.39
7.3.210.0090.01216.27
7.3.200.0070.01019.39
7.3.190.0060.00916.15
7.3.180.0070.01016.44
7.3.170.0140.00316.27
7.3.160.0150.00616.45
7.3.120.0150.00014.79
7.2.330.0060.01216.69
7.2.320.0110.00616.71
7.2.310.0140.00316.66
7.2.300.0130.00316.75
7.2.290.0060.00916.39
7.2.60.0060.00616.70
7.2.00.0030.00919.15
7.1.200.0070.00315.68
7.1.100.0070.01017.84
7.1.70.0070.00717.09
7.1.60.0060.01919.82
7.1.50.0000.02016.88
7.1.00.0030.07322.44
7.0.200.0100.00314.77
7.0.140.0030.07322.00
7.0.60.0030.04319.95
7.0.50.0030.04717.86
7.0.40.0200.04020.13
7.0.30.0270.08020.30
7.0.20.0200.04020.06
7.0.10.0030.04320.16
7.0.00.0100.07020.07
5.6.280.0100.06721.14
5.6.210.0130.07320.77
5.6.200.0070.06718.24
5.6.190.0130.08020.61
5.6.180.0370.06720.63
5.6.170.0270.05020.55
5.6.160.0000.04720.55
5.6.150.0000.04318.15
5.6.140.0070.05018.29
5.6.130.0030.07018.16
5.6.120.0000.05721.01
5.6.110.0100.08321.02
5.6.100.0070.09720.90
5.6.90.0130.07721.14
5.6.80.0130.07320.55
5.5.350.0030.07320.45
5.5.340.0000.04717.98
5.5.330.0100.04320.57
5.5.320.2630.04020.31
5.5.310.0270.07320.28
5.5.300.0130.06317.94
5.5.290.0100.08017.93
5.5.280.0030.04320.79
5.5.270.0000.05020.76
5.5.260.0000.08320.68
5.5.250.0070.03720.56
5.5.240.0070.06320.16
5.4.450.0730.06019.61
5.4.440.0530.06019.32
5.4.430.0630.05719.54
5.4.420.0730.04719.53
5.4.410.0070.05318.70
5.4.400.0300.07718.77
5.4.390.0300.05718.73
5.4.380.0170.05018.84
5.4.370.0000.05318.78
5.4.360.0130.04018.81
5.4.350.0110.05512.04
5.4.340.0050.03512.04
5.4.320.0060.03612.52
5.4.310.0080.03812.52
5.4.300.0070.03412.52
5.4.290.0040.03912.52
5.4.280.0110.03612.41
5.4.270.0070.03712.41
5.4.260.0100.03312.41
5.4.250.0100.05318.90
5.4.240.0130.04718.80
5.4.230.0070.05718.80
5.4.220.0100.05018.98
5.4.210.0100.07018.94
5.4.200.0030.07018.93
5.4.190.0100.05018.80
5.4.180.0100.05318.99
5.4.170.0170.05018.95
5.4.160.0130.05018.74
5.4.150.0100.05719.07
5.4.140.0130.05016.44
5.4.130.0030.05016.64
5.4.120.0070.07316.41
5.4.110.0170.04316.70
5.4.100.0170.06316.54
5.4.90.0130.04316.46
5.4.80.0100.04716.45
5.4.70.0000.06016.45
5.4.60.0070.05316.59
5.4.50.0100.04716.62
5.4.40.0100.04716.51
5.4.30.0130.04716.30
5.4.20.0000.07716.54
5.4.10.0200.05716.52
5.4.00.0130.04715.82
5.3.290.0060.03912.80
5.3.280.0000.05714.76
5.3.270.0030.05714.78
5.3.260.0170.06014.69
5.3.250.0070.05014.69
5.3.240.0030.05314.78
5.3.230.0130.05314.50
5.3.220.0070.05714.74
5.3.210.0030.07314.55
5.3.200.0030.06014.70
5.3.190.0030.05714.75
5.3.180.0170.04714.65
5.3.170.0130.04714.65
5.3.160.0030.05314.55
5.3.150.0130.04714.64
5.3.140.0100.04714.69
5.3.130.0100.05314.45
5.3.120.0170.04714.77
5.3.110.0170.06014.70
5.3.100.0100.07013.94
5.3.90.0000.07313.99
5.3.80.0100.06313.84
5.3.70.0070.05714.09
5.3.60.0030.07314.07
5.3.50.0100.05313.97
5.3.40.0100.06713.86
5.3.30.0230.06013.98
5.3.20.0100.06313.91
5.3.10.0100.06713.65
5.3.00.0130.04713.81
5.2.170.0100.04711.20
5.2.160.0170.04011.22
5.2.150.0100.04711.09
5.2.140.0070.05710.97
5.2.130.0070.04011.07
5.2.120.0000.04711.07
5.2.110.0070.04711.08
5.2.100.0100.03710.92
5.2.90.0070.04311.06
5.2.80.0070.05711.30
5.2.70.0070.05711.16
5.2.60.0070.04010.88
5.2.50.0070.04310.92
5.2.40.0100.04311.09
5.2.30.0030.06311.05
5.2.20.0070.04011.02
5.2.10.0130.03310.95
5.2.00.0070.06010.55
5.1.60.0100.04010.20
5.1.50.0070.04710.05
5.1.40.0130.04310.07
5.1.30.0070.03310.41
5.1.20.0130.03010.18
5.1.10.0030.04010.12
5.1.00.0030.0439.85
5.0.50.0070.0278.51
5.0.40.0000.0308.41
5.0.30.0100.0578.28
5.0.20.0030.0278.23
5.0.10.0070.0238.32
5.0.00.0070.0378.24
4.4.90.0000.0277.00
4.4.80.0000.0237.00
4.4.70.0030.0237.00
4.4.60.0030.0207.00
4.4.50.0030.0307.00
4.4.40.0070.0307.00
4.4.30.0100.0237.00
4.4.20.0030.0207.00
4.4.10.0130.0137.00
4.4.00.0070.0437.00
4.3.110.0000.0277.00
4.3.100.0030.0237.00
4.3.90.0000.0337.00
4.3.80.0000.0337.00
4.3.70.0100.0177.00
4.3.60.0070.0207.00
4.3.50.0070.0237.00
4.3.40.0030.0337.00
4.3.30.0030.0207.00
4.3.20.0070.0177.00
4.3.10.0030.0277.00
4.3.00.0130.0307.09

preferences:
50.78 ms | 401 KiB | 5 Q