3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { static function bar() { $foo = static function() { return get_called_class(); }; return $foo(); } static function baz() { $foo = function() { return get_called_class(); }; $ack=new \StdClass; return $foo->bindTo($ack); } } class Bar extends Foo { } 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.0070.01416.71
8.3.50.0100.01221.98
8.3.40.0120.00918.89
8.3.30.0060.00919.07
8.3.20.0040.00420.03
8.3.10.0080.00023.69
8.3.00.0070.00317.50
8.2.180.0040.01518.18
8.2.170.0000.01422.96
8.2.160.0070.00720.52
8.2.150.0040.00424.18
8.2.140.0070.00724.66
8.2.130.0040.00426.16
8.2.120.0000.00822.09
8.2.110.0050.00520.84
8.2.100.0070.00417.84
8.2.90.0040.00419.23
8.2.80.0080.00018.04
8.2.70.0000.00817.63
8.2.60.0030.00517.93
8.2.50.0080.00418.07
8.2.40.0040.00418.16
8.2.30.0000.00717.95
8.2.20.0040.00417.81
8.2.10.0070.00018.13
8.2.00.0070.00317.81
8.1.280.0110.00725.92
8.1.270.0040.00422.22
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0090.00319.23
8.1.230.0120.00019.05
8.1.220.0000.00817.74
8.1.210.0050.00318.77
8.1.200.0030.00617.35
8.1.190.0000.00717.50
8.1.180.0050.00318.10
8.1.170.0040.00418.32
8.1.160.0000.00721.91
8.1.150.0040.00418.64
8.1.140.0000.00817.57
8.1.130.0000.00717.83
8.1.120.0080.00017.54
8.1.110.0030.00417.47
8.1.100.0040.00417.52
8.1.90.0000.00717.47
8.1.80.0030.00317.40
8.1.70.0030.00317.40
8.1.60.0080.00417.48
8.1.50.0040.00417.48
8.1.40.0040.00417.50
8.1.30.0030.00617.63
8.1.20.0050.00317.66
8.1.10.0000.00717.52
8.1.00.0050.00217.49
8.0.300.0030.00519.21
8.0.290.0040.00417.04
8.0.280.0050.00318.37
8.0.270.0000.00817.20
8.0.260.0030.00317.21
8.0.250.0030.00317.00
8.0.240.0090.00316.85
8.0.230.0000.00816.86
8.0.220.0000.00716.83
8.0.210.0000.00616.80
8.0.200.0030.00917.07
8.0.190.0000.00717.02
8.0.180.0000.00717.02
8.0.170.0090.00016.86
8.0.160.0040.00416.90
8.0.150.0000.00816.80
8.0.140.0040.00416.91
8.0.130.0030.00613.31
8.0.120.0000.00816.94
8.0.110.0070.00016.89
8.0.100.0070.00016.91
8.0.90.0000.00716.83
8.0.80.0070.00816.90
8.0.70.0070.00017.02
8.0.60.0080.00017.00
8.0.50.0000.00716.83
8.0.30.0080.01017.08
8.0.20.0120.00517.40
8.0.10.0040.00417.03
8.0.00.0120.00916.75
7.4.330.0000.00515.00
7.4.320.0060.00016.53
7.4.300.0030.00316.53
7.4.290.0000.00816.55
7.4.280.0030.00316.59
7.4.270.0070.00016.63
7.4.260.0030.00316.53
7.4.250.0000.00716.48
7.4.240.0040.00416.54
7.4.230.0040.00416.67
7.4.220.0100.00716.67
7.4.210.0030.01216.55
7.4.200.0040.00416.58
7.4.190.0030.00616.61
7.4.160.0050.01016.31
7.4.150.0100.00917.40
7.4.140.0150.00417.86
7.4.130.0080.00816.47
7.4.120.0070.00916.46
7.4.110.0100.00716.55
7.4.100.0070.01116.52
7.4.90.0120.00516.61
7.4.80.0000.01819.39
7.4.70.0000.01516.38
7.4.60.0030.01316.59
7.4.50.0000.00916.10
7.4.40.0070.00322.77
7.4.30.0030.01216.61
7.4.00.0070.01015.03
7.3.330.0000.00513.24
7.3.320.0020.00213.40
7.3.310.0000.00716.42
7.3.300.0030.00316.30
7.3.290.0100.01016.38
7.3.280.0110.00816.37
7.3.270.0130.00417.40
7.3.260.0070.01016.55
7.3.250.0090.00916.44
7.3.240.0100.01316.29
7.3.230.0060.01316.51
7.3.210.0070.01116.36
7.3.200.0070.01319.39
7.3.190.0140.00316.48
7.3.180.0040.01216.23
7.3.170.0040.01516.54
7.3.160.0100.00616.32
7.3.120.0120.00514.70
7.3.110.0050.01014.76
7.3.100.0060.00814.93
7.3.90.0020.00814.82
7.3.80.0070.00614.74
7.3.70.0050.00514.76
7.3.60.0020.01214.79
7.3.50.0100.00514.82
7.3.40.0090.00614.92
7.3.30.0080.00914.80
7.3.20.0050.00716.42
7.3.10.0070.01016.44
7.3.00.0060.01016.64
7.2.330.0120.00616.71
7.2.320.0170.00016.42
7.2.310.0140.00316.54
7.2.300.0040.01516.54
7.2.290.0080.00816.74
7.2.250.0120.00815.13
7.2.240.0050.00914.85
7.2.230.0080.00814.86
7.2.220.0040.00915.00
7.2.210.0050.00915.19
7.2.200.0060.00914.91
7.2.190.0060.00614.98
7.2.180.0080.00514.83
7.2.170.0050.00815.08
7.2.160.0060.01214.96
7.2.150.0060.01016.95
7.2.140.0070.01016.71
7.2.130.0120.00816.96
7.2.120.0030.01216.95
7.2.110.0130.00616.79
7.2.100.0080.01216.82
7.2.90.0120.00716.76
7.2.80.0140.00816.70
7.2.70.0110.00816.95
7.2.60.0100.00716.82
7.2.50.0090.01116.82
7.2.40.0090.00816.86
7.2.30.0090.00816.84
7.2.20.0120.00816.92
7.2.10.0100.00816.92
7.2.00.0100.00717.45
7.1.330.0080.00515.80
7.1.320.0080.00815.72
7.1.310.0030.01015.96
7.1.300.0020.01115.68
7.1.290.0080.00615.73
7.1.280.0070.00815.77
7.1.270.0050.00915.82
7.1.260.0040.00715.76
7.1.250.0070.00815.85
7.1.230.0230.00715.55
7.1.220.0330.00415.66
7.1.210.0240.00715.79
7.1.200.0120.00615.70
7.1.190.0150.01515.81
7.1.180.0110.00715.77
7.1.170.0140.00915.54
7.1.160.0180.00615.69
7.1.150.0130.01015.59
7.1.140.0170.00315.66
7.1.130.0180.00615.88
7.1.120.0230.00015.39
7.1.110.0220.00515.45
7.1.100.0170.00416.83
7.1.90.0220.00315.55
7.1.80.0140.00015.55
7.1.70.0130.00516.38
7.1.60.0120.01417.66
7.1.50.0150.01216.27
7.1.40.0120.01215.89
7.1.30.0210.00715.80
7.1.20.0200.01615.98
7.1.10.0170.00415.78
7.1.00.0080.04119.04
7.0.310.0170.00715.38
7.0.300.0120.00415.59
7.0.290.0190.00815.38
7.0.280.0190.00315.38
7.0.270.0210.00315.36
7.0.260.0130.00315.51
7.0.250.0220.00315.38
7.0.240.0220.00315.34
7.0.230.0290.00715.25
7.0.220.0130.00415.49
7.0.210.0170.01015.33
7.0.200.0250.00714.85
7.0.190.0190.00615.51
7.0.180.0070.01915.36
7.0.170.0140.01115.07
7.0.160.0180.00415.35
7.0.150.0170.00415.12
7.0.140.0080.04518.75
7.0.130.0090.01415.58
7.0.120.0190.00015.45
7.0.110.0100.00715.35
7.0.100.0200.00315.15
7.0.90.0190.01015.33
7.0.80.0220.00815.54
7.0.70.0170.00715.07
7.0.60.0080.02817.71
7.0.50.0100.03016.72
7.0.40.0120.02216.70
7.0.30.0300.02316.65
7.0.20.0180.03016.65
7.0.10.0110.03816.76
7.0.00.0050.02516.75
5.6.380.0110.00514.43
5.6.370.0130.00314.14
5.6.360.0140.00314.62
5.6.350.0110.00314.62
5.6.340.0070.01014.22
5.6.330.0160.00014.55
5.6.320.0150.00314.30
5.6.310.0180.00514.38
5.6.300.0130.00414.12
5.6.290.0110.00714.30
5.6.280.0120.03817.64
5.6.270.0110.00614.45
5.6.260.0090.00914.51
5.6.250.0110.00614.18
5.6.240.0130.00714.61
5.6.230.0090.00514.18
5.6.220.0100.00714.19
5.6.210.0080.04417.42
5.6.200.0080.02816.33
5.6.190.0120.02017.52
5.6.180.0220.04217.47
5.6.170.0200.04617.34
5.6.160.0050.04917.20
5.6.150.0080.04316.35
5.6.140.0070.04616.31
5.6.130.0070.02616.27
5.6.120.0140.04017.64
5.6.110.0100.04517.79
5.6.100.0140.04317.69
5.6.90.0140.04417.57
5.6.80.0100.03217.28
5.6.70.0150.03417.30
5.6.60.0140.00414.46
5.6.50.0210.00313.79
5.6.40.0190.00014.39
5.6.30.0110.00814.29
5.6.20.0090.00914.12
5.6.10.0180.00414.22
5.6.00.0110.00414.25
5.5.380.0090.00412.79
5.5.370.0100.00412.79
5.5.360.0130.00012.79
5.5.350.0140.03816.59
5.5.340.0100.03215.42
5.5.330.0110.02616.54
5.5.320.0150.02916.53
5.5.310.0200.02516.63
5.5.300.0050.03515.36
5.5.290.0070.04515.37
5.5.280.0110.02216.84
5.5.270.0070.03316.74
5.5.260.0130.04216.83
5.5.250.0120.03816.74
5.5.240.0110.04016.54
5.5.230.0100.00212.79
5.5.220.0030.01012.79
5.5.210.0110.00412.79
5.5.200.0100.00312.79
5.5.190.0120.00312.79
5.5.180.0140.00312.79
5.5.170.0110.00414.02
5.5.160.0190.00012.79
5.5.150.0150.00712.79
5.5.140.0090.00412.79
5.5.130.0150.00312.79
5.5.120.0180.00312.79
5.5.110.0120.00012.79
5.5.100.0110.00512.79
5.5.90.0070.00712.79
5.5.80.0090.00512.79
5.5.70.0180.00012.79
5.5.60.0160.00012.79
5.5.50.0060.00612.79
5.5.40.0030.01012.79
5.5.30.0160.00412.79
5.5.20.0080.00412.79
5.5.10.0100.00012.79
5.5.00.0100.00212.79
5.4.450.0140.03016.18
5.4.440.0190.02616.14
5.4.430.0130.02916.20
5.4.420.0160.02816.13
5.4.410.0110.03115.98
5.4.400.0160.02816.03
5.4.390.0160.03315.97
5.4.380.0200.04215.79
5.4.370.0320.02615.81
5.4.360.0330.02515.80
5.4.350.0230.03615.71
5.4.340.0230.03915.80
5.4.330.0120.00612.79
5.4.320.0100.01912.65
5.4.310.0070.02312.65
5.4.300.0060.02312.65
5.4.290.0080.02112.65
5.4.280.0110.02612.59
5.4.270.0080.02612.59
5.4.260.0100.02612.59
5.4.250.0120.02812.59
5.4.240.0100.02012.59
5.4.230.0070.02812.59
5.4.220.0090.01712.59
5.4.210.0090.01912.59
5.4.200.0080.02112.58
5.4.190.0070.02212.59
5.4.180.0150.02512.58
5.4.170.0150.03312.59
5.4.160.0120.02812.58
5.4.150.0100.02112.59
5.4.140.0090.02412.43
5.4.130.0070.02312.42
5.4.120.0110.01712.40
5.4.110.0120.02012.40
5.4.100.0100.02012.40
5.4.90.0110.01912.40
5.4.80.0070.02912.40
5.4.70.0120.02312.40
5.4.60.0090.02012.40
5.4.50.0100.02112.39
5.4.40.0100.02312.39
5.4.30.0090.02312.39
5.4.20.0100.02312.39
5.4.10.0090.02112.39
5.4.00.0040.02512.13
5.3.290.0090.02012.80
5.3.280.0090.01912.75
5.3.270.0040.02412.76
5.3.260.0090.02112.76
5.3.250.0040.02412.76
5.3.240.0080.02112.75
5.3.230.0060.02612.75
5.3.220.0070.02212.73
5.3.210.0080.02112.74
5.3.200.0100.02012.73
5.3.190.0090.02112.73
5.3.180.0080.02112.73
5.3.170.0110.02012.73
5.3.160.0110.03012.73
5.3.150.0100.02612.73
5.3.140.0080.02712.72
5.3.130.0070.03112.72
5.3.120.0070.02712.72
5.3.110.0090.02912.72
5.3.100.0080.02612.45
5.3.90.0110.02912.44
5.3.80.0100.02212.43
5.3.70.0070.02312.43
5.3.60.0100.01912.43
5.3.50.0100.01612.39
5.3.40.0100.01812.40
5.3.30.0080.01812.37
5.3.20.0080.02112.26
5.3.10.0100.01912.24
5.3.00.0100.02012.24
5.2.170.0090.01410.99
5.2.160.0070.02210.99
5.2.150.0050.02110.99
5.2.140.0080.02010.98
5.2.130.0030.01810.97
5.2.120.0050.01710.97
5.2.110.0080.01510.97
5.2.100.0070.01510.97
5.2.90.0050.01710.96
5.2.80.0100.01610.97
5.2.70.0050.01910.96
5.2.60.0040.01810.94
5.2.50.0040.02310.93
5.2.40.0080.01410.91
5.2.30.0090.01610.90
5.2.20.0070.02110.90
5.2.10.0060.02010.85
5.2.00.0110.01410.78
5.1.60.0060.01710.43
5.1.50.0060.01510.43
5.1.40.0070.01510.42
5.1.30.0080.01810.59
5.1.20.0040.01410.60
5.1.10.0080.01510.46
5.1.00.0070.01210.47
5.0.50.0060.0139.70
5.0.40.0060.0109.63
5.0.30.0050.0179.54
5.0.20.0080.0109.52
5.0.10.0070.0109.51
5.0.00.0030.0179.50
4.4.90.0020.0108.79
4.4.80.0070.0088.77
4.4.70.0020.0118.77
4.4.60.0060.0088.77
4.4.50.0030.0098.78
4.4.40.0040.0168.75
4.4.30.0050.0078.77
4.4.20.0030.0098.81
4.4.10.0030.0128.82
4.4.00.0030.0168.77
4.3.110.0020.0118.73
4.3.100.0050.0118.73
4.3.90.0020.0098.71
4.3.80.0030.0198.69
4.3.70.0040.0098.71
4.3.60.0030.0118.71
4.3.50.0030.0148.71
4.3.40.0040.0168.66
4.3.30.0010.0108.04
4.3.20.0050.0098.03
4.3.10.0030.0098.01
4.3.00.0010.0139.75

preferences:
56.64 ms | 401 KiB | 5 Q