3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { static function bar() { $foo = static function() { //var_dump( $this ); return get_called_class(); }; return $foo(); } function baz() { $foo = function() { //print "baz: " . var_dump( $self); return get_called_class(); }; return $foo(); } } class Bar extends Foo { } class Bloo { function spaz() { print Bar::baz(); } } $bloo=new Bloo(); print $bloo->spaz(); // assert(Bar::bar() === 'Bar'); // assert(Bar::baz() === 'Bar'); print Bar::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.60.0100.01016.75
8.3.50.0130.00522.06
8.3.40.0060.01218.82
8.3.30.0080.00619.27
8.3.20.0040.00420.16
8.3.10.0080.00023.66
8.3.00.0000.00820.76
8.2.180.0040.01116.63
8.2.170.0070.00722.96
8.2.160.0100.00322.16
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00422.11
8.2.110.0030.00622.31
8.2.100.0110.00017.78
8.2.90.0040.00419.22
8.2.80.0060.00317.97
8.2.70.0060.00317.63
8.2.60.0040.00417.80
8.2.50.0030.00718.07
8.2.40.0070.00417.80
8.2.30.0080.00318.00
8.2.20.0000.00717.69
8.2.10.0000.00717.55
8.2.00.0090.00317.62
8.1.280.0110.00425.92
8.1.270.0000.00822.02
8.1.260.0080.00026.35
8.1.250.0050.00328.09
8.1.240.0060.00323.96
8.1.230.0080.00318.93
8.1.220.0040.00417.74
8.1.210.0080.00018.77
8.1.200.0060.00317.35
8.1.190.0040.00417.41
8.1.180.0030.00618.10
8.1.170.0030.00618.45
8.1.160.0080.00021.93
8.1.150.0070.00018.42
8.1.140.0080.00017.29
8.1.130.0000.00717.81
8.1.120.0040.00317.28
8.1.110.0000.00817.29
8.1.100.0000.00717.28
8.1.90.0000.00717.42
8.1.80.0050.00217.45
8.1.70.0000.00817.21
8.1.60.0030.00617.47
8.1.50.0040.00417.48
8.1.40.0030.00517.40
8.1.30.0030.00517.61
8.1.20.0000.00817.54
8.1.10.0080.00017.39
8.1.00.0000.00717.49
8.0.300.0070.00018.77
8.0.290.0070.00017.05
8.0.280.0000.00818.38
8.0.270.0000.00717.13
8.0.260.0030.00318.48
8.0.250.0070.00016.99
8.0.240.0070.00016.87
8.0.230.0000.00816.88
8.0.220.0000.00616.95
8.0.210.0030.00316.85
8.0.200.0020.00516.86
8.0.190.0000.00716.82
8.0.180.0000.00716.89
8.0.170.0000.00716.92
8.0.160.0000.00716.88
8.0.150.0100.00016.82
8.0.140.0040.00416.82
8.0.130.0000.00513.32
8.0.120.0040.00416.73
8.0.110.0040.00416.79
8.0.100.0000.00716.86
8.0.90.0040.00416.93
8.0.80.0060.01616.81
8.0.70.0050.00316.72
8.0.60.0000.00716.86
8.0.50.0000.00816.79
8.0.30.0070.01417.00
8.0.20.0160.00517.40
8.0.10.0070.00016.82
8.0.00.0090.01016.80
7.4.330.0050.00015.15
7.4.320.0000.00616.64
7.4.300.0030.00316.46
7.4.290.0000.00716.61
7.4.280.0000.00716.38
7.4.270.0000.00616.46
7.4.260.0040.00416.37
7.4.250.0070.00016.41
7.4.240.0000.00716.49
7.4.230.0000.00716.57
7.4.220.0140.00316.36
7.4.210.0090.00816.55
7.4.200.0040.00416.40
7.4.190.0070.00016.46
7.4.160.0140.00816.49
7.4.150.0140.00317.40
7.4.140.0080.01217.86
7.4.130.0070.01116.52
7.4.120.0140.00316.54
7.4.110.0090.01216.56
7.4.100.0120.00416.61
7.4.90.0140.00916.37
7.4.80.0150.00416.36
7.4.70.0060.00916.60
7.4.60.0130.01316.48
7.4.50.0000.00816.35
7.4.40.0100.00322.77
7.4.30.0100.00616.48
7.4.00.0050.01014.93
7.3.330.0000.00513.35
7.3.320.0050.00013.21
7.3.310.0070.00016.36
7.3.300.0030.00316.24
7.3.290.0100.01016.32
7.3.280.0100.00516.36
7.3.270.0100.01017.40
7.3.260.0030.01516.28
7.3.250.0150.00916.43
7.3.240.0040.01416.49
7.3.230.0130.00316.40
7.3.210.0060.01216.50
7.3.200.0090.00919.39
7.3.190.0060.01616.29
7.3.180.0100.00716.55
7.3.170.0110.00516.54
7.3.160.0110.00616.34
7.3.120.0120.00514.80
7.3.110.0030.01014.56
7.3.100.0030.01414.96
7.3.90.0030.01314.63
7.3.80.0070.00714.89
7.3.70.0100.00314.71
7.3.60.0070.00714.76
7.3.50.0060.00614.66
7.3.40.0080.00814.66
7.3.30.0000.00914.69
7.3.20.0060.00916.57
7.3.10.0030.01116.44
7.3.00.0070.00816.39
7.2.330.0120.00616.55
7.2.320.0130.01016.52
7.2.310.0100.00716.79
7.2.300.0100.00616.60
7.2.290.0100.01316.77
7.2.250.0070.01315.01
7.2.240.0100.01014.88
7.2.230.0130.00615.05
7.2.220.0060.01215.14
7.2.210.0070.00714.93
7.2.200.0030.01315.19
7.2.190.0070.00715.02
7.2.180.0050.00615.04
7.2.170.0030.01415.05
7.2.130.0090.00616.62
7.2.120.0130.00516.61
7.2.110.0110.01116.65
7.2.100.0070.00717.00
7.2.90.0220.00316.80
7.2.80.0060.00816.63
7.2.70.0090.01116.88
7.2.60.0110.00616.74
7.2.50.0140.01417.04
7.2.40.0140.00716.79
7.2.30.0130.00716.55
7.2.20.0090.00917.04
7.2.10.0090.00916.89
7.2.00.0090.00918.00
7.1.330.0070.00715.79
7.1.320.0150.00015.74
7.1.310.0090.00615.30
7.1.300.0030.01415.54
7.1.290.0040.01115.63
7.1.280.0060.00815.61
7.1.270.0030.00615.50
7.1.260.0030.01115.73
7.1.250.0100.00715.43
7.1.200.0110.00015.69
7.1.100.0050.00518.02
7.1.70.0060.00316.81
7.1.60.0060.01619.22
7.1.50.0000.02116.84
7.1.00.0100.07022.25
7.0.200.0070.00716.35
7.0.140.0000.07322.09
7.0.60.0170.07019.98
7.0.50.0100.04317.89
7.0.40.0100.05720.11
7.0.30.0400.05720.17
7.0.20.0270.08020.19
7.0.10.0230.08720.25
7.0.00.0170.06720.10
5.6.280.0070.07321.17
5.6.210.0100.06020.63
5.6.200.0000.06318.16
5.6.190.0130.03720.55
5.6.180.0100.04720.50
5.6.170.0400.05720.56
5.6.160.0030.08720.45
5.6.150.0130.07018.19
5.6.140.0130.08018.23
5.6.130.0100.07018.18
5.6.120.0130.05321.04
5.6.110.0030.04320.91
5.6.100.0070.08720.99
5.6.90.0070.08320.99
5.6.80.0100.04020.40
5.6.70.4000.03720.30
5.5.350.0100.08020.54
5.5.340.0030.06018.09
5.5.330.0070.08720.32
5.5.320.0070.07320.19
5.5.310.0270.07320.24
5.5.300.0030.04018.00
5.5.290.0000.04717.96
5.5.280.0100.08320.87
5.5.270.0030.04320.70
5.5.260.0170.07720.85
5.5.250.0100.05720.63
5.5.240.0100.07320.17
5.4.450.0670.04019.57
5.4.440.0600.04319.28
5.4.430.0670.04019.56
5.4.420.0700.03719.30
5.4.410.0300.04319.33
5.4.400.1230.05018.77
5.4.390.0770.05718.84
5.4.380.0270.06018.51
5.4.370.0300.04718.73
5.4.360.0130.05718.57
5.4.350.0100.07318.51
5.4.340.0130.05318.81
5.4.320.0050.03812.52
5.4.310.0040.04112.52
5.4.300.0030.03912.52
5.4.290.0080.03812.51
5.4.280.0130.05712.38
5.4.270.0110.05212.38
5.4.260.0110.04512.38
5.4.250.0250.06312.14
5.4.240.0420.05912.14
5.4.230.0330.07412.13
5.4.220.0430.07212.13
5.4.210.0120.06312.38
5.4.200.0490.06912.13
5.4.190.0190.05912.37
5.4.180.0110.06012.36
5.4.170.0470.07212.14
5.4.160.0150.05812.32
5.4.150.0080.05112.37
5.4.140.0130.05312.06
5.4.130.0150.06212.04
5.4.120.0280.06211.73
5.4.110.0340.07711.73
5.4.100.0250.03811.73
5.4.90.0190.05912.00
5.4.80.0740.07611.72
5.4.70.0220.05611.98
5.4.60.0140.06111.99
5.4.50.0340.07111.71
5.4.40.0110.05511.98
5.4.30.0100.05711.98
5.4.20.0170.08111.86
5.4.10.0150.05111.98
5.4.00.0090.05811.46
5.3.290.0070.04012.80
5.3.280.0600.07012.71
5.3.270.0350.06812.72
5.3.260.0280.08012.72
5.3.250.0270.06012.72
5.3.240.0340.07112.72
5.3.230.0830.07512.71
5.3.220.0410.07912.68
5.3.210.0470.07812.68
5.3.200.0480.06212.68
5.3.190.0690.06012.68
5.3.180.1100.07112.67
5.3.170.1170.06412.67
5.3.160.0120.06112.67
5.3.150.0380.07112.67
5.3.140.0180.06112.66
5.3.130.0660.10912.66
5.3.120.0130.06512.66
5.3.110.0210.06512.66
5.3.100.0170.05912.11
5.3.90.0220.06412.08
5.3.80.0380.06112.07
5.3.70.0470.07212.08
5.3.60.0130.05812.06
5.3.50.0570.07112.00
5.3.40.0450.07912.00
5.3.30.0190.05211.95
5.3.20.0660.07911.65
5.3.10.0390.07111.59
5.3.00.0470.07011.57
5.2.170.0400.0759.02
5.2.160.0450.0699.03
5.2.150.0580.0699.02
5.2.140.0100.0409.18
5.2.130.0070.0489.14
5.2.120.0150.0439.14
5.2.110.0140.0439.14
5.2.100.0490.0628.97
5.2.90.0410.0558.96
5.2.80.0840.0698.95
5.2.70.0550.0558.96
5.2.60.0200.0478.96
5.2.50.0640.0558.99
5.2.40.0100.0399.04
5.2.30.0390.0608.80
5.2.20.0160.0449.00
5.2.10.0120.0398.91
5.2.00.0150.0438.79
5.1.60.0350.0497.69
5.1.50.0250.0608.06
5.1.40.0520.0437.66
5.1.30.0820.0538.15
5.1.20.0250.0348.19
5.1.10.0190.0497.99
5.1.00.0080.0428.14
5.0.50.0270.0246.26
5.0.40.0060.0216.48
5.0.30.0070.0426.28
5.0.20.0660.0445.82
5.0.10.0090.0245.85
5.0.00.0710.0555.69
4.4.90.0210.0214.78
4.4.80.0130.0314.75
4.4.70.0260.0254.76
4.4.60.0570.0374.75
4.4.50.0140.0224.77
4.4.40.0140.0384.71
4.4.30.0100.0244.76
4.4.20.0130.0244.85
4.4.10.0510.0304.85
4.4.00.0070.0334.76
4.3.110.0060.0194.67
4.3.100.0070.0244.67
4.3.90.0070.0204.63
4.3.80.0090.0314.58
4.3.70.0070.0234.63
4.3.60.0490.0264.63
4.3.50.0340.0424.63
4.3.40.0130.0374.54
4.3.30.0140.0312.96
4.3.20.0100.0183.03
4.3.10.0110.0252.98
4.3.00.0130.01713.14

preferences:
55.69 ms | 401 KiB | 5 Q