3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyClass { public function test() {echo __METHOD__ . "\n";} public static function testStatic() {echo __METHOD__ . "\n";} } class MyClass2 extends MyClass { public function test() { echo __METHOD__ . "\n"; $c = array('parent','test'); $c(); } public static function testStatic() { echo __METHOD__ . "\n"; $c = array('parent','testStatic'); $c(); $c = array('static','testLate'); $c(); } } class MyClass3 extends MyClass2 { public static function testLate() {echo __METHOD__ . "\n";} } echo "call object method:\n"; $o = new MyClass3(); $o->test(); $o->testStatic(); echo "call static method:\n"; MyClass3::testStatic();

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.00718.31
8.3.50.0120.00922.06
8.3.40.0040.01118.79
8.3.30.0070.01119.22
8.3.20.0050.00220.33
8.3.10.0060.00323.48
8.3.00.0040.00419.25
8.2.180.0160.00316.50
8.2.170.0080.00822.96
8.2.160.0080.00820.52
8.2.150.0060.00924.18
8.2.140.0120.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00422.35
8.2.110.0070.00322.04
8.2.100.0120.00017.75
8.2.90.0040.00419.08
8.2.80.0080.00017.97
8.2.70.0070.00417.75
8.2.60.0000.00917.93
8.2.50.0040.00418.07
8.2.40.0030.00519.95
8.2.30.0040.00418.01
8.2.20.0040.00417.68
8.2.10.0040.00418.07
8.2.00.0050.00317.80
8.1.280.0070.00725.92
8.1.270.0090.00021.93
8.1.260.0160.00326.35
8.1.250.0040.00428.09
8.1.240.0040.00424.02
8.1.230.0080.00419.01
8.1.220.0040.00417.74
8.1.210.0030.00518.77
8.1.200.0060.00317.23
8.1.190.0030.00517.13
8.1.180.0050.00318.10
8.1.170.0050.00318.52
8.1.160.0040.00421.87
8.1.150.0000.00718.75
8.1.140.0000.00717.35
8.1.130.0070.00017.74
8.1.120.0070.00017.38
8.1.110.0060.00317.38
8.1.100.0000.00717.30
8.1.90.0030.00617.36
8.1.80.0040.00417.45
8.1.70.0080.00017.29
8.1.60.0040.00417.54
8.1.50.0030.00517.46
8.1.40.0030.00517.41
8.1.30.0030.00517.57
8.1.20.0040.00417.63
8.1.10.0040.00417.48
8.1.00.0000.00717.48
8.0.300.0060.00318.77
8.0.290.0040.00416.75
8.0.280.0070.00018.46
8.0.270.0000.00817.29
8.0.260.0000.00817.23
8.0.250.0040.00416.95
8.0.240.0050.00316.96
8.0.230.0000.00716.82
8.0.220.0060.00016.86
8.0.210.0030.00316.75
8.0.200.0060.00017.02
8.0.190.0070.00016.96
8.0.180.0050.00316.95
8.0.170.0030.00516.93
8.0.160.0070.00016.86
8.0.150.0030.00516.87
8.0.140.0000.00716.82
8.0.130.0050.00013.41
8.0.120.0000.00816.84
8.0.110.0000.00716.96
8.0.100.0040.00416.77
8.0.90.0000.00716.96
8.0.80.0030.01316.96
8.0.70.0040.00416.85
8.0.60.0040.00416.80
8.0.50.0060.00316.76
8.0.30.0140.00817.14
8.0.20.0070.01217.40
8.0.10.0000.00716.89
8.0.00.0090.00716.82
7.4.330.0050.00015.00
7.4.320.0030.00316.53
7.4.300.0030.00316.52
7.4.290.0000.00716.59
7.4.280.0030.00816.59
7.4.270.0000.00716.49
7.4.260.0030.00316.59
7.4.250.0000.00816.56
7.4.240.0040.00416.53
7.4.230.0000.00716.40
7.4.220.0140.00416.54
7.4.210.0140.00716.47
7.4.200.0000.00716.71
7.4.160.0030.01316.68
7.4.150.0150.00317.40
7.4.140.0090.01417.86
7.4.130.0080.01016.60
7.4.120.0100.01116.63
7.4.110.0090.00916.72
7.4.100.0130.00516.55
7.4.90.0170.00016.48
7.4.80.0070.01419.39
7.4.70.0110.00716.50
7.4.60.0060.00916.52
7.4.50.0000.00516.52
7.4.40.0030.01316.50
7.4.30.0130.00316.56
7.4.00.0040.00715.00
7.3.330.0060.00013.37
7.3.320.0030.00313.17
7.3.310.0000.00716.38
7.3.300.0070.00016.38
7.3.290.0150.00616.33
7.3.280.0130.00416.36
7.3.270.0080.01417.40
7.3.260.0040.01316.45
7.3.250.0050.01316.29
7.3.240.0070.01116.30
7.3.230.0090.00916.39
7.3.210.0180.00016.57
7.3.200.0130.00719.39
7.3.190.0100.01016.59
7.3.180.0130.00316.52
7.3.170.0060.01616.45
7.3.160.0070.01516.42
7.3.10.0080.01616.36
7.3.00.0160.00816.13
7.2.330.0100.00716.25
7.2.320.0090.01216.58
7.2.310.0070.01016.70
7.2.300.0080.00816.77
7.2.290.0120.00816.66
7.2.130.0200.00316.50
7.2.120.0260.00516.58
7.2.110.0320.00716.48
7.2.100.0210.00016.53
7.2.90.0100.01016.59
7.2.80.0080.00816.54
7.2.70.0110.00016.45
7.2.60.0050.00916.74
7.2.50.0130.00716.39
7.2.40.0130.00716.43
7.2.30.0180.00316.64
7.2.20.0090.00616.45
7.2.10.0110.00416.51
7.2.00.0140.00716.80
7.1.250.0200.01215.23
7.1.200.0080.00015.69
7.1.70.0040.00417.10
7.1.60.0120.01219.32
7.1.50.0090.01616.70
7.1.00.0100.07022.33
7.0.200.0030.00616.61
7.0.140.0030.07322.06
7.0.60.0070.07019.76
7.0.50.0100.03317.88
7.0.40.0070.07320.30
7.0.30.0270.04720.33
7.0.20.0330.06320.15
7.0.10.0100.07720.30
7.0.00.0030.06320.07
5.6.280.0030.09720.88
5.6.210.0130.03720.76
5.6.200.0000.04318.18
5.6.190.0100.09020.61
5.6.180.0200.03320.60
5.6.170.0230.07720.44
5.6.160.0070.09020.71
5.6.150.0100.03718.15
5.6.140.0030.04018.29
5.6.130.0070.08018.21
5.6.120.0170.08320.77
5.6.110.0070.06321.08
5.6.100.0100.08021.04
5.6.90.0030.07721.00
5.6.80.0030.05020.29
5.5.350.0300.03020.41
5.5.340.0100.03718.09
5.5.330.0000.06320.40
5.5.320.0300.04320.34
5.5.310.0400.07020.30
5.5.300.0030.06717.94
5.5.290.0070.07718.00
5.5.280.0070.08020.88
5.5.270.0200.07020.83
5.5.260.0030.09020.80
5.5.250.0100.05020.70
5.5.240.0270.06720.27
5.4.450.0730.05719.65
5.4.440.0930.05019.48
5.4.430.0900.06319.46
5.4.420.0670.00019.51
5.4.410.0630.00019.32
5.4.400.0700.00019.13
5.4.390.0630.00019.07
5.4.380.0630.00019.16
5.4.370.0870.00019.07
5.4.360.0630.00019.11
5.4.350.0770.00019.03
5.4.340.0050.03512.02
5.4.320.0060.03612.52
5.4.310.0100.03512.51
5.4.300.0100.04112.51
5.4.290.0050.04112.50
5.4.280.0060.03412.40
5.4.270.0060.03512.40
5.4.260.0070.04312.41
5.4.250.0100.05612.40
5.4.240.0090.03512.40
5.4.230.0070.04512.39
5.4.220.0060.03512.39
5.4.210.0060.03712.39
5.4.200.0020.04112.39
5.4.190.0080.03412.39
5.4.180.0030.03812.39
5.4.170.0040.03912.41
5.4.160.0050.03712.39
5.4.150.0050.04112.40
5.4.140.0090.03412.07
5.4.130.0090.03212.07
5.4.120.0070.03512.02
5.4.110.0050.03712.02
5.4.100.0080.03312.02
5.4.90.0070.03612.02
5.4.80.0040.04012.02
5.4.70.0050.03612.02
5.4.60.0060.03412.02
5.4.50.0050.03612.02
5.4.40.0080.04512.00
5.4.30.0050.03712.00
5.4.20.0060.03512.00
5.4.10.0060.03912.00
5.4.00.0070.03511.49
5.3.290.0050.04012.80
5.3.280.0030.04112.71
5.3.270.0040.05412.72
5.3.260.0070.05512.72
5.3.250.0110.04912.72
5.3.240.0070.03812.72
5.3.230.0060.03812.71
5.3.220.0060.04012.68
5.3.210.0060.04412.68
5.3.200.0050.04112.68
5.3.190.0050.04012.68
5.3.180.0030.04012.67
5.3.170.0060.04612.67
5.3.160.0080.03512.67
5.3.150.0080.03512.67
5.3.140.0080.03912.66
5.3.130.0050.04512.66
5.3.120.0040.04012.66
5.3.110.0090.03812.66
5.3.100.0050.04312.13
5.3.90.0080.05112.11
5.3.80.0120.03612.10
5.3.70.0040.04012.10
5.3.60.0060.03612.09
5.3.50.0040.03812.04
5.3.40.0090.03312.04
5.3.30.0090.03212.00
5.3.20.0040.03711.78
5.3.10.0080.03611.74
5.3.00.0100.05911.73
5.2.170.0070.0489.23
5.2.160.0040.0369.23
5.2.150.0060.0309.23
5.2.140.0050.0309.23
5.2.130.0060.0289.19
5.2.120.0070.0269.19
5.2.110.0060.0299.20
5.2.100.0050.0309.19
5.2.90.0090.0279.19
5.2.80.0050.0309.19
5.2.70.0050.0309.18
5.2.60.0050.0299.14
5.2.50.0040.0319.11
5.2.40.0050.0299.08
5.2.30.0070.0339.07
5.2.20.0040.0309.05
5.2.10.0080.0268.96
5.2.00.0040.0308.82
5.1.60.0070.0278.10
5.1.50.0040.0258.09
5.1.40.0030.0258.08
5.1.30.0070.0288.43
5.1.20.0050.0258.45
5.1.10.0070.0298.18
5.1.00.0010.0338.18
5.0.50.0050.0236.66
5.0.40.0050.0196.52
5.0.30.0020.0336.32
5.0.20.0040.0196.29
5.0.10.0040.0206.27
5.0.00.0050.0296.27
4.4.90.0050.0144.78
4.4.80.0010.0184.76
4.4.70.0020.0174.76
4.4.60.0040.0154.75
4.4.50.0020.0164.77
4.4.40.0030.0254.71
4.4.30.0020.0184.76
4.4.20.0010.0184.84
4.4.10.0030.0184.85
4.4.00.0020.0264.76
4.3.110.0010.0184.67
4.3.100.0040.0144.67
4.3.90.0030.0144.64
4.3.80.0010.0264.58
4.3.70.0020.0154.63
4.3.60.0050.0144.63
4.3.50.0030.0154.63
4.3.40.0000.0284.54
4.3.30.0030.0253.30
4.3.20.0030.0233.28
4.3.10.0010.0213.23
4.3.00.0100.0277.05

preferences:
32.47 ms | 401 KiB | 5 Q