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(); $baz = $foo->bindTo(null, B::class); $baz();

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.40.0040.01118.67
8.3.30.0150.00319.12
8.3.20.0070.00720.35
8.3.10.0080.00022.09
8.3.00.0040.00422.39
8.2.170.0110.01122.96
8.2.160.0030.01319.21
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0130.00626.16
8.2.120.0050.00319.64
8.2.110.0040.00422.07
8.2.100.0090.00317.78
8.2.90.0040.00419.17
8.2.80.0060.00318.04
8.2.70.0000.00917.38
8.2.60.0080.00017.80
8.2.50.0040.00418.07
8.2.40.0040.00418.22
8.2.30.0050.00318.07
8.2.20.0000.00717.72
8.2.10.0000.00717.74
8.2.00.0090.00017.68
8.1.270.0060.00318.48
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0100.00023.96
8.1.230.0090.00318.97
8.1.220.0060.00317.76
8.1.210.0060.00318.77
8.1.200.0050.00517.22
8.1.190.0090.00017.53
8.1.180.0040.00420.48
8.1.170.0040.00418.56
8.1.160.0000.00722.14
8.1.150.0000.00718.51
8.1.140.0000.00717.49
8.1.130.0030.00317.83
8.1.120.0030.00417.50
8.1.110.0000.00717.48
8.1.100.0000.00717.48
8.1.90.0000.00817.34
8.1.80.0030.00317.34
8.1.70.0000.00717.48
8.1.60.0040.00417.60
8.1.50.0000.00717.47
8.1.40.0040.00417.40
8.1.30.0040.00417.61
8.1.20.0040.00417.68
8.1.10.0080.00017.54
8.1.00.0060.00617.37
8.0.300.0040.00418.77
8.0.290.0070.00017.04
8.0.280.0000.00718.36
8.0.270.0000.00717.27
8.0.260.0080.00016.69
8.0.250.0000.00717.02
8.0.240.0040.00416.96
8.0.230.0000.00716.86
8.0.220.0070.00016.80
8.0.210.0030.00316.78
8.0.200.0030.00316.96
8.0.190.0000.00716.94
8.0.180.0050.00316.93
8.0.170.0080.00016.94
8.0.160.0080.00016.98
8.0.150.0030.00616.77
8.0.140.0000.00716.80
8.0.130.0050.00013.38
8.0.120.0000.00816.73
8.0.110.0000.00716.84
8.0.100.0030.00316.95
8.0.90.0050.00316.96
8.0.80.0120.00416.88
8.0.70.0040.00416.90
8.0.60.0050.00216.89
8.0.50.0040.00416.95
8.0.30.0100.01116.89
8.0.20.0110.01017.40
8.0.10.0040.00416.90
8.0.00.0080.01016.68
7.4.330.0000.00515.00
7.4.320.0060.00016.39
7.4.300.0000.00616.65
7.4.290.0040.00416.61
7.4.280.0030.00616.53
7.4.270.0060.00016.53
7.4.260.0000.00716.50
7.4.250.0030.00316.57
7.4.240.0050.00216.46
7.4.230.0040.00416.31
7.4.220.0060.02116.68
7.4.210.0080.00916.59
7.4.200.0000.00716.50
7.4.190.0000.00716.74
7.4.160.0070.00716.42
7.4.150.0110.00617.40
7.4.140.0090.01117.86
7.4.130.0170.00516.65
7.4.120.0110.00716.35
7.4.110.0080.01316.56
7.4.100.0140.00716.58
7.4.90.0070.01016.63
7.4.80.0070.01019.39
7.4.70.0110.00516.24
7.4.60.0090.00916.41
7.4.50.0060.00316.68
7.4.40.0030.00722.77
7.4.30.0100.00516.58
7.4.10.0060.01115.00
7.4.00.0070.01015.04
7.3.330.0030.00313.17
7.3.320.0020.00213.07
7.3.310.0080.00016.27
7.3.300.0030.00316.19
7.3.290.0090.00616.35
7.3.280.0120.00716.31
7.3.270.0100.00717.40
7.3.260.0110.00716.30
7.3.250.0120.00416.57
7.3.240.0080.01016.18
7.3.230.0090.00816.48
7.3.210.0040.01216.32
7.3.200.0160.00619.39
7.3.190.0100.00916.20
7.3.180.0080.00816.39
7.3.170.0090.01316.44
7.3.160.0070.01016.55
7.3.130.0030.01314.82
7.3.120.0050.01014.86
7.3.110.0030.01414.57
7.3.100.0030.01014.77
7.3.90.0030.01214.56
7.3.80.0090.00614.92
7.3.70.0060.00914.74
7.3.60.0040.00914.59
7.3.50.0080.00414.73
7.3.40.0110.00414.91
7.3.30.0030.00514.79
7.3.20.0040.01216.48
7.3.10.0090.00516.56
7.3.00.0100.00316.57
7.2.330.0060.01116.79
7.2.320.0070.01716.63
7.2.310.0100.00716.54
7.2.300.0120.00316.59
7.2.290.0100.00616.74
7.2.260.0070.01014.89
7.2.250.0100.00714.77
7.2.240.0060.00915.03
7.2.230.0000.01014.89
7.2.220.0100.00715.20
7.2.210.0040.01114.96
7.2.200.0060.01215.22
7.2.190.0060.00314.68
7.2.180.0040.00714.97
7.2.170.0100.00314.90
7.2.160.0040.01114.95
7.2.150.0110.00716.96
7.2.140.0100.00716.84
7.2.130.0030.01016.92
7.2.120.0050.01316.81
7.2.110.0050.00916.89
7.2.100.0040.00916.79
7.2.90.0060.00816.84
7.2.80.0050.00916.79
7.2.70.0120.00517.09
7.2.60.0060.00816.90
7.2.50.0100.00616.96
7.2.40.0050.00516.85
7.2.30.0090.00316.79
7.2.20.0020.01016.90
7.2.10.0100.00216.95
7.2.00.0030.01117.75
7.1.330.0090.00615.71
7.1.320.0030.01015.68
7.1.310.0060.00615.71
7.1.300.0000.01715.59
7.1.290.0070.00815.73
7.1.280.0030.00915.72
7.1.270.0110.00615.59
7.1.260.0000.01815.68
7.1.250.0070.00715.48
7.1.240.0030.01015.36
7.1.230.0090.00615.70
7.1.220.0070.00715.59
7.1.210.0090.00615.76
7.1.200.0030.01015.71
7.1.190.0040.00815.72
7.1.180.0040.01115.46
7.1.170.0140.00315.56
7.1.160.0070.00715.67
7.1.150.0070.01015.73
7.1.140.0110.00415.40
7.1.130.0030.00515.78
7.1.120.0030.01215.66
7.1.110.0030.00715.82
7.1.100.0040.01016.70
7.1.90.0130.00315.67
7.1.80.0060.00915.55
7.1.70.0020.00816.33
7.1.60.0090.00917.84
7.1.50.0110.00316.23
7.1.40.0080.00315.55
7.1.30.0000.01015.48
7.1.20.0070.00715.55
7.1.10.0040.01115.71
7.1.00.0010.03319.05
7.0.330.0090.00615.35
7.0.320.0050.00515.22
7.0.310.0110.00415.15
7.0.300.0030.01015.06
7.0.290.0030.00715.33
7.0.280.0040.01115.24
7.0.270.0060.00915.05
7.0.260.0000.01115.44
7.0.250.0070.00715.32
7.0.240.0000.01115.21
7.0.230.0160.00015.20
7.0.220.0050.00315.50
7.0.210.0080.00415.44
7.0.200.0030.01114.98
7.0.190.0060.00615.25
7.0.180.0030.01415.42
7.0.170.0090.00315.17
7.0.160.0050.00515.23
7.0.150.0030.01615.15
7.0.140.0050.04318.64
7.0.130.0040.00415.50
7.0.120.0080.00515.20
7.0.110.0030.01015.24
7.0.100.0040.00715.32
7.0.90.0060.00615.31
7.0.80.0070.00715.14
7.0.70.0060.00615.31
7.0.60.0070.04717.70
7.0.50.0050.02516.51
7.0.40.0050.04916.76
7.0.30.0120.03716.66
7.0.20.0200.03716.87
7.0.10.0130.04116.84
7.0.00.0140.03816.69
5.6.400.0060.00614.25
5.6.390.0080.01114.22
5.6.380.0060.00914.20
5.6.370.0000.01114.58
5.6.360.0070.00714.27
5.6.350.0060.00914.51
5.6.340.0080.00314.51
5.6.330.0000.01314.31
5.6.320.0070.01014.38
5.6.310.0030.01014.15
5.6.300.0130.00714.48
5.6.290.0110.00413.91
5.6.280.0080.03817.78
5.6.270.0070.00714.31
5.6.260.0040.00814.34
5.6.250.0070.00414.25
5.6.240.0030.01014.43
5.6.230.0030.01014.03
5.6.220.0030.00614.15
5.6.210.0110.01717.40
5.6.200.0020.05316.25
5.6.190.0100.04517.35
5.6.180.1810.02317.43
5.6.170.0170.02717.32
5.6.160.0050.03117.32
5.6.150.0060.03816.36
5.6.140.0080.03716.15
5.6.130.0050.03116.20
5.6.120.0060.04117.62
5.6.110.0070.02517.61
5.6.100.0080.04617.62
5.6.90.0100.04017.65
5.6.80.0110.03017.28
5.6.70.0160.03717.12
5.6.60.0070.01014.33
5.6.50.0060.00614.26
5.6.40.0080.00814.16
5.6.30.0100.00314.36
5.6.20.0060.00614.30
5.6.10.0060.01014.09
5.6.00.0000.01314.27
5.5.380.0030.01014.31
5.5.370.0040.00714.28
5.5.360.0070.00314.00
5.5.350.0080.05017.25
5.5.340.0070.04016.04
5.5.330.0070.02517.41
5.5.320.0150.02317.22
5.5.310.0140.03617.37
5.5.300.0060.02616.01
5.5.290.0050.04516.07
5.5.280.0020.02717.45
5.5.270.0070.04317.66
5.5.260.0100.03117.39
5.5.250.0080.03817.45
5.5.240.0040.02517.30
5.5.230.0030.01214.21
5.5.220.0130.00314.21
5.5.210.0050.00614.21
5.5.200.0090.00614.23
5.5.190.0110.00414.40
5.5.180.0060.00314.13
5.5.170.0000.01613.95
5.5.160.0070.00714.29
5.5.150.0070.00714.46
5.5.140.0100.00314.07
5.5.130.0090.00614.52
5.5.120.0000.01514.38
5.5.110.0040.01114.40
5.5.100.0040.00814.30
5.5.90.0040.00814.37
5.5.80.0110.00414.22
5.5.70.0030.01014.39
5.5.60.0070.00714.50
5.5.50.0000.01014.08
5.5.40.0060.00313.74
5.5.30.0090.00613.94
5.5.20.0070.00714.56
5.5.10.0030.01314.14
5.5.00.0060.00814.16
5.4.450.0420.03315.08
5.4.440.0360.02814.91
5.4.430.0090.02915.10
5.4.420.0100.02615.33
5.4.410.0400.02815.00
5.4.400.0500.03014.80
5.4.390.0550.03514.76
5.4.380.0180.02814.70
5.4.370.0130.02414.60
5.4.360.0070.02814.70
5.4.350.0120.02811.29
5.4.340.0060.02211.44
5.4.330.0030.00910.79
5.4.320.0080.02011.65
5.4.310.0030.02311.62
5.4.300.0090.02011.60
5.4.290.0040.02411.62
5.4.280.0060.01911.65
5.4.270.0050.02011.66
5.4.260.0070.02011.67
5.4.250.0120.02314.82
5.4.240.0090.02814.74
5.4.230.0120.02714.83
5.4.220.0050.03714.83
5.4.210.0110.04014.93
5.4.200.0020.03314.91
5.4.190.0070.03714.74
5.4.180.0110.02514.76
5.4.170.0010.03314.74
5.4.160.0080.03214.69
5.4.150.0080.03114.88
5.4.140.0060.02813.71
5.4.130.0110.03513.61
5.4.120.0060.02713.60
5.4.110.0070.02813.71
5.4.100.0100.03713.74
5.4.90.0070.02513.68
5.4.80.0030.03013.70
5.4.70.0050.03013.63
5.4.60.0070.02713.78
5.4.50.0070.02913.51
5.4.40.0110.03113.78
5.4.30.0080.03213.64
5.4.20.0100.03313.41
5.4.10.0130.03313.72
5.4.00.0070.03013.31
5.3.290.0050.02111.50
5.3.280.0080.03212.43
5.3.270.0070.02812.51
5.3.260.0050.03512.31
5.3.250.0050.03012.38
5.3.240.0100.03812.29
5.3.230.0020.03112.37
5.3.220.0050.03512.49
5.3.210.0060.03012.54
5.3.200.0040.03212.24
5.3.190.0050.03012.33
5.3.180.0030.03112.55
5.3.170.0090.02612.59
5.3.160.0150.03212.44
5.3.150.0100.02712.58
5.3.140.0100.03812.38
5.3.130.0050.02912.57
5.3.120.0130.03012.43
5.3.110.0050.03812.38
5.3.100.0120.02912.29
5.3.90.0050.02912.16
5.3.80.0050.04012.13
5.3.70.0100.02312.04
5.3.60.0030.03512.23
5.3.50.0070.02812.14
5.3.40.0090.03512.18
5.3.30.0080.03212.17
5.3.20.0050.02711.99
5.3.10.0030.03211.66
5.3.00.0050.02811.93
5.2.170.0030.04711.21
5.2.160.0030.05011.30
5.2.150.0100.05311.05
5.2.140.0000.06011.35
5.2.130.0170.04711.16
5.2.120.0000.04311.10
5.2.110.0070.04010.93
5.2.100.0000.04711.16
5.2.90.0070.04311.32
5.2.80.0000.04711.09
5.2.70.0070.04711.16
5.2.60.0030.05311.27
5.2.50.0000.05011.11
5.2.40.0070.05711.21
5.2.30.0070.04311.04
5.2.20.0070.05311.13
5.2.10.0070.04010.76
5.2.00.0170.03310.55
5.1.60.0030.05010.05
5.1.50.0100.04310.04
5.1.40.0070.0479.93
5.1.30.0070.03710.51
5.1.20.0070.04710.41
5.1.10.0170.03710.09
5.1.00.0030.04010.11
5.0.50.0000.0338.74
5.0.40.0000.0308.64
5.0.30.0000.0438.28
5.0.20.0070.0278.43
5.0.10.0000.0308.40
5.0.00.0030.0578.22
4.4.90.0000.0276.29
4.4.80.0070.0176.29
4.4.70.0000.0336.19
4.4.60.0000.0336.19
4.4.50.0030.0236.19
4.4.40.0000.0406.19
4.4.30.0170.0076.19
4.4.20.0000.0236.19
4.4.10.0000.0236.19
4.4.00.0000.0406.19
4.3.110.0100.0136.19
4.3.100.0000.0236.19
4.3.90.0030.0236.19
4.3.80.0030.0306.19
4.3.70.0000.0236.19
4.3.60.0070.0276.19
4.3.50.0030.0206.19
4.3.40.0000.0376.19
4.3.30.0000.0236.19
4.3.20.0030.0206.19
4.3.10.0000.0236.19
4.3.00.0200.0177.66

preferences:
41.73 ms | 400 KiB | 5 Q