3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { static function bar() { $foo = static function() { return get_called_class(); }; $foo->bindTo(null,'Bar'); print get_called_class(); print get_class($foo); return $foo(); } } class Bar extends Foo { } print Foo::bar(); print Bar::bar(); //assert(Bar::bar() === 'Bar'); //assert(Bar::baz() === '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.0150.00416.63
8.3.50.0060.00922.00
8.3.40.0150.00718.83
8.3.30.0090.00619.17
8.3.20.0030.00320.16
8.3.10.0040.00423.54
8.3.00.0110.00017.50
8.2.180.0110.00718.41
8.2.170.0100.00722.96
8.2.160.0070.00720.47
8.2.150.0030.00524.18
8.2.140.0000.01424.66
8.2.130.0040.00426.16
8.2.120.0040.00422.09
8.2.110.0080.00022.21
8.2.100.0040.00717.84
8.2.90.0090.00019.18
8.2.80.0060.00318.03
8.2.70.0060.00317.63
8.2.60.0040.00417.80
8.2.50.0000.00818.07
8.2.40.0040.00418.22
8.2.30.0000.00718.08
8.2.20.0040.00417.75
8.2.10.0000.00717.96
8.2.00.0070.00317.69
8.1.280.0080.00825.92
8.1.270.0080.00022.02
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0040.00423.83
8.1.230.0060.00619.01
8.1.220.0000.00817.74
8.1.210.0050.00318.77
8.1.200.0060.00317.35
8.1.190.0000.00817.28
8.1.180.0030.00618.10
8.1.170.0070.00418.39
8.1.160.0070.00021.93
8.1.150.0000.00718.64
8.1.140.0050.00217.36
8.1.130.0000.00717.88
8.1.120.0030.00317.53
8.1.110.0040.00417.35
8.1.100.0040.00417.49
8.1.90.0040.00417.48
8.1.80.0030.00317.44
8.1.70.0030.00317.33
8.1.60.0060.00317.58
8.1.50.0040.00417.43
8.1.40.0050.00217.40
8.1.30.0040.00417.50
8.1.20.0040.00417.71
8.1.10.0040.00417.60
8.1.00.0050.00217.43
8.0.300.0060.00319.09
8.0.290.0040.00417.04
8.0.280.0030.00318.48
8.0.270.0000.00717.30
8.0.260.0030.00317.18
8.0.250.0030.00316.93
8.0.240.0080.00316.87
8.0.230.0040.00416.92
8.0.220.0030.00316.84
8.0.210.0030.00316.69
8.0.200.0030.00716.95
8.0.190.0040.00417.02
8.0.180.0000.00816.91
8.0.170.0040.00416.92
8.0.160.0090.00016.79
8.0.150.0030.00516.84
8.0.140.0080.00016.86
8.0.130.0080.00013.39
8.0.120.0040.00416.88
8.0.110.0040.00416.90
8.0.100.0070.00016.68
8.0.90.0040.00416.86
8.0.80.0040.01116.88
8.0.70.0050.00316.75
8.0.60.0050.00316.85
8.0.50.0000.00716.73
8.0.30.0090.00917.27
8.0.20.0100.00717.40
8.0.10.0070.00016.90
8.0.00.0110.01116.91
7.4.330.0050.00015.00
7.4.320.0030.00316.41
7.4.300.0000.00716.59
7.4.290.0070.00016.50
7.4.280.0030.00316.59
7.4.270.0050.00316.58
7.4.260.0030.00516.59
7.4.250.0000.00716.61
7.4.240.0000.00716.48
7.4.230.0000.00716.63
7.4.220.0070.01016.63
7.4.210.0080.00916.61
7.4.200.0000.00716.36
7.4.190.0090.00016.66
7.4.160.0060.00916.55
7.4.150.0130.00717.40
7.4.140.0070.01017.86
7.4.130.0140.00416.57
7.4.120.0080.01016.49
7.4.110.0100.01316.38
7.4.100.0180.00316.49
7.4.90.0060.00916.40
7.4.80.0160.00619.39
7.4.70.0060.01216.52
7.4.60.0060.01016.50
7.4.50.0000.00516.57
7.4.40.0070.01022.77
7.4.30.0080.00816.43
7.4.00.0040.01215.05
7.3.330.0050.00013.36
7.3.320.0050.00013.34
7.3.310.0000.00716.36
7.3.300.0030.00316.27
7.3.290.0150.00016.36
7.3.280.0070.00916.34
7.3.270.0120.00617.40
7.3.260.0140.00316.42
7.3.250.0100.00816.36
7.3.240.0080.00816.27
7.3.230.0090.00916.60
7.3.210.0090.00916.49
7.3.200.0100.00719.39
7.3.190.0030.01316.70
7.3.180.0040.01216.35
7.3.170.0170.00016.56
7.3.160.0030.01316.64
7.3.120.0040.01214.80
7.2.330.0130.01116.68
7.2.320.0030.01416.61
7.2.310.0060.01216.44
7.2.300.0140.00716.45
7.2.290.0030.01816.75
7.2.60.0040.00716.88
7.1.200.0070.00715.63
7.1.70.0070.00716.86
7.1.60.0190.00619.33
7.1.50.0030.01716.87
7.1.00.0030.07722.48
7.0.200.0140.00714.73
7.0.140.0000.07322.22
7.0.60.0070.08020.02
7.0.50.0130.07717.88
7.0.40.0130.04020.26
7.0.30.0200.03720.28
7.0.20.0200.05720.08
7.0.10.0100.07020.32
7.0.00.0000.09720.14
5.6.280.0030.07321.09
5.6.210.0230.05720.71
5.6.200.0070.07318.23
5.6.190.0100.06720.41
5.6.180.0130.04320.39
5.6.170.0330.08320.47
5.6.160.0070.06020.39
5.6.150.0070.04018.28
5.6.140.0030.08718.23
5.6.130.0070.06318.18
5.6.120.0030.04021.03
5.6.110.0070.04021.05
5.6.100.0030.08321.13
5.6.90.0270.05021.08
5.6.80.0000.04020.40
5.6.70.4400.04320.29
5.5.350.0100.08720.41
5.5.340.0170.06717.95
5.5.330.0030.04020.47
5.5.320.0200.07020.47
5.5.310.0200.04720.23
5.5.300.0030.08018.08
5.5.290.0100.08317.95
5.5.280.0030.06020.87
5.5.270.0170.07320.84
5.5.260.0100.08020.65
5.5.250.0070.08320.62
5.5.240.0200.07720.27
5.4.450.0230.05319.48
5.4.440.0100.06019.47
5.4.430.0130.05719.63
5.4.420.0270.04719.70
5.4.410.0230.05019.05
5.4.400.0330.04319.27
5.4.390.0300.04019.01
5.4.380.0400.06318.53
5.4.370.0200.06718.70
5.4.360.0230.04718.63
5.4.350.0270.04318.50
5.4.340.0400.04718.84
5.4.320.0080.03512.51
5.4.310.0040.04312.51
5.4.300.0080.04012.51
5.4.290.0070.03712.50
5.4.280.0120.05212.37
5.4.270.0120.06312.38
5.4.260.0170.06412.37
5.4.250.0280.10812.38
5.4.240.0220.13612.37
5.4.230.0330.12612.36
5.4.220.0130.06412.36
5.4.210.0130.05412.36
5.4.200.0060.06512.36
5.4.190.0110.05512.36
5.4.180.0130.05712.36
5.4.170.0150.05312.37
5.4.160.0090.06412.36
5.4.150.0110.05812.37
5.4.140.0110.05712.05
5.4.130.0150.04812.04
5.4.120.0090.06211.99
5.4.110.0110.06111.99
5.4.100.0150.05111.99
5.4.90.0080.06011.99
5.4.80.0140.05511.99
5.4.70.0110.05811.98
5.4.60.0110.05511.98
5.4.50.0070.06111.99
5.4.40.0110.05611.98
5.4.30.0140.05411.97
5.4.20.0090.05911.96
5.4.10.0130.05311.97
5.4.00.0080.05011.46
5.3.290.0050.04012.80
5.3.280.0100.04812.71
5.3.270.0140.06512.72
5.3.260.0140.06112.72
5.3.250.0080.06212.72
5.3.240.0110.04412.72
5.3.230.0090.04112.71
5.3.220.0150.05212.68
5.3.210.0120.06312.68
5.3.200.0090.05312.68
5.3.190.0100.04912.67
5.3.180.0090.05112.67
5.3.170.0080.05312.67
5.3.160.0120.04912.68
5.3.150.0090.05312.67
5.3.140.0110.04912.66
5.3.130.0100.05312.66
5.3.120.0120.05312.66
5.3.110.0140.05412.66
5.3.100.0130.04912.12
5.3.90.0120.04912.08
5.3.80.0100.04912.08
5.3.70.0120.04912.08
5.3.60.0090.05312.07
5.3.50.0130.04712.00
5.3.40.0170.04612.00
5.3.30.0130.04611.95
5.3.20.0110.04611.73
5.3.10.0150.04511.70
5.3.00.0120.04711.69
5.2.170.0090.0419.19
5.2.160.0080.0439.18
5.2.150.0110.0389.18
5.2.140.0120.0399.18
5.2.130.0120.0409.14
5.2.120.0120.0409.14
5.2.110.0080.0409.14
5.2.100.0080.0449.15
5.2.90.0100.0429.14
5.2.80.0120.0429.14
5.2.70.0190.0339.13
5.2.60.0100.0409.09
5.2.50.0110.0399.07
5.2.40.0070.0379.04
5.2.30.0080.0399.02
5.2.20.0080.0379.00
5.2.10.0060.0388.92
5.2.00.0060.0408.78
5.1.60.0070.0358.07
5.1.50.0070.0328.07
5.1.40.0060.0338.04
5.1.30.0050.0428.39
5.1.20.0150.0328.41
5.1.10.0070.0348.14
5.1.00.0060.0378.14
5.0.50.0100.0256.61
5.0.40.0050.0276.48
5.0.30.0050.0436.28
5.0.20.0050.0276.25
5.0.10.0090.0246.23
5.0.00.0050.0416.22
4.4.90.0060.0214.78
4.4.80.0060.0234.76
4.4.70.0050.0214.75
4.4.60.0050.0214.75
4.4.50.0060.0204.77
4.4.40.0030.0354.71
4.4.30.0070.0194.76
4.4.20.0070.0224.84
4.4.10.0050.0224.85
4.4.00.0060.0334.76
4.3.110.0050.0234.67
4.3.100.0090.0184.66
4.3.90.0090.0174.63
4.3.80.0060.0324.59
4.3.70.0050.0204.63
4.3.60.0050.0214.62
4.3.50.0050.0224.63
4.3.40.0040.0334.54
4.3.30.0030.0213.29
4.3.20.0040.0223.26
4.3.10.0070.0233.22
4.3.00.0030.0276.72

preferences:
43.04 ms | 401 KiB | 5 Q