3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Log { public function alert($message); } class EchoLog implements Log { public function alert($message) { echo $message; } } class TestLog { private $log; const TEST = ['hoi']; public function __construct(Log $log) { $this->log = $log; } public function run() { $this->log->alert(TEST[0]); } } $testLog = new TestLog(new EchoLog()); $testLog->run();

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.0090.00918.43
8.3.50.0110.00721.13
8.3.40.0100.00718.80
8.3.30.0070.01019.13
8.3.20.0070.00020.20
8.3.10.0080.00023.66
8.3.00.0080.00019.38
8.2.180.0140.00718.54
8.2.170.0110.01122.96
8.2.160.0100.00320.39
8.2.150.0000.00824.18
8.2.140.0030.00524.66
8.2.130.0040.00426.16
8.2.120.0080.00620.98
8.2.110.0060.00322.25
8.2.100.0080.00417.75
8.2.90.0050.00319.11
8.2.80.0000.00817.97
8.2.70.0090.00017.50
8.2.60.0070.00017.80
8.2.50.0030.00518.07
8.2.40.0000.00818.09
8.2.30.0040.00418.18
8.2.20.0000.00717.66
8.2.10.0000.00718.05
8.2.00.0070.00017.80
8.1.280.0100.01025.92
8.1.270.0000.00822.01
8.1.260.0060.00326.35
8.1.250.0000.00828.09
8.1.240.0060.00323.83
8.1.230.0030.00818.97
8.1.220.0000.00817.79
8.1.210.0040.00418.77
8.1.200.0070.00717.25
8.1.190.0050.00317.22
8.1.180.0050.00318.10
8.1.170.0080.00018.56
8.1.160.0040.00421.95
8.1.150.0000.00718.90
8.1.140.0040.00417.45
8.1.130.0030.00317.82
8.1.120.0000.00717.48
8.1.110.0000.00717.49
8.1.100.0000.00717.43
8.1.90.0030.00517.47
8.1.80.0000.00717.46
8.1.70.0030.00317.33
8.1.60.0030.00917.59
8.1.50.0030.00517.52
8.1.40.0040.00417.44
8.1.30.0040.00417.67
8.1.20.0060.00317.56
8.1.10.0040.00417.57
8.1.00.0040.00417.52
8.0.300.0040.00418.77
8.0.290.0000.00816.75
8.0.280.0070.00018.46
8.0.270.0070.00017.28
8.0.260.0030.00317.34
8.0.250.0000.00717.00
8.0.240.0030.00316.94
8.0.230.0030.00317.06
8.0.220.0030.00316.91
8.0.210.0000.00716.99
8.0.200.0030.00317.02
8.0.190.0040.00416.91
8.0.180.0060.00317.04
8.0.170.0000.00716.93
8.0.160.0000.00816.87
8.0.150.0030.00316.87
8.0.140.0040.00416.77
8.0.130.0030.00613.41
8.0.120.0080.00016.93
8.0.110.0040.00417.04
8.0.100.0050.00317.01
8.0.90.0000.00716.95
8.0.80.0090.01516.96
8.0.70.0030.00517.04
8.0.60.0040.00416.94
8.0.50.0080.00017.04
8.0.30.0130.00617.23
8.0.20.0150.00417.43
8.0.10.0050.00317.15
8.0.00.0170.00616.79
7.4.330.0020.00215.09
7.4.320.0030.00316.51
7.4.300.0060.00016.61
7.4.290.0040.00416.47
7.4.280.0040.00416.50
7.4.270.0030.00316.63
7.4.260.0040.00416.52
7.4.250.0020.00516.44
7.4.240.0020.00516.52
7.4.230.0020.00516.71
7.4.220.0100.01616.60
7.4.210.0090.00916.72
7.4.200.0070.00016.61
7.4.160.0100.00616.61
7.4.150.0070.01117.40
7.4.140.0110.00617.86
7.4.130.0090.00916.53
7.4.120.0120.00716.65
7.4.110.0030.01316.42
7.4.100.0100.00716.58
7.4.90.0090.00916.50
7.4.80.0030.01419.39
7.4.70.0090.01216.67
7.4.60.0100.00616.46
7.4.50.0030.00616.81
7.4.40.0070.01116.77
7.4.30.0030.01316.61
7.4.00.0000.01515.06
7.3.330.0030.00313.37
7.3.320.0030.00313.43
7.3.310.0090.00016.48
7.3.300.0000.00716.38
7.3.290.0090.00716.39
7.3.280.0120.00616.37
7.3.270.0120.00617.40
7.3.260.0180.00016.32
7.3.250.0120.00716.48
7.3.240.0120.01216.63
7.3.230.0100.00716.39
7.3.210.0070.01016.56
7.3.200.0040.01119.39
7.3.190.0110.01016.57
7.3.180.0060.00916.46
7.3.170.0080.00916.45
7.3.160.0080.00816.54
7.2.330.0120.00616.67
7.2.320.0070.01016.69
7.2.310.0030.01516.82
7.2.300.0100.00616.59
7.2.290.0040.01516.49
7.2.60.0030.00617.04
7.2.00.0040.01119.27
7.1.200.0060.00615.89
7.1.100.0060.00618.14
7.1.70.0030.00317.19
7.1.60.0100.01419.32
7.1.50.0070.01316.61
7.1.00.0070.07322.36
7.0.200.0030.00316.77
7.0.140.0000.07722.13
7.0.60.0170.07321.84
7.0.50.0170.07317.88
7.0.40.0000.04720.23
7.0.30.0300.07720.15
7.0.20.0330.05020.25
7.0.10.0030.07320.23
7.0.00.0100.08720.15
5.6.280.0100.06721.07
5.6.210.0100.07720.63
5.6.200.0100.07718.14
5.6.190.0000.09020.50
5.6.180.0330.05020.57
5.6.170.0270.06020.45
5.6.160.0170.07720.54
5.6.150.0030.04318.16
5.6.140.0030.07018.18
5.6.130.0000.05018.14
5.6.120.0100.05721.06
5.6.110.0000.08720.90
5.6.100.0070.07021.12
5.6.90.0100.06721.13
5.6.80.0100.08020.54
5.5.350.0170.03320.41
5.5.340.0200.06718.03
5.5.330.0130.07720.14
5.5.320.0530.06320.31
5.5.310.0270.07320.37
5.5.300.0070.07717.99
5.5.290.0130.07018.05
5.5.280.0070.07020.88
5.5.270.0000.05020.86
5.5.260.0130.07720.96
5.5.250.0130.07720.70
5.5.240.0130.07720.29
5.4.450.0030.06319.34
5.4.440.0800.05719.34
5.4.430.0630.06319.69
5.4.420.0430.05719.55
5.4.410.0830.05019.34
5.4.400.0470.05719.16
5.4.390.0670.05318.98
5.4.380.1170.05719.37
5.4.370.0700.05719.26
5.4.360.0600.06019.27
5.4.350.0530.06319.14
5.4.340.0100.03312.02
5.4.320.0060.03612.52
5.4.310.0110.03612.51
5.4.300.0060.03712.51
5.4.290.0050.03812.51
5.4.280.0070.03512.40
5.4.270.0050.03712.41
5.4.260.0050.03812.40
5.4.250.0070.03712.40
5.4.240.0050.03612.40
5.4.230.0100.03312.40
5.4.220.0060.03712.39
5.4.210.0070.03412.39
5.4.200.0070.03712.40
5.4.190.0080.03412.39
5.4.180.0100.03112.39
5.4.170.0060.03512.41
5.4.160.0090.03212.40
5.4.150.0080.03312.39
5.4.140.0060.03612.08
5.4.130.0050.03612.07
5.4.120.0060.03412.03
5.4.110.0060.03512.02
5.4.100.0050.03612.02
5.4.90.0080.03412.02
5.4.80.0070.03512.02
5.4.70.0060.03512.02
5.4.60.0070.03412.02
5.4.50.0090.03212.02
5.4.40.0040.03612.01
5.4.30.0080.03412.00
5.4.20.0070.03412.00
5.4.10.0080.03212.00
5.4.00.0070.03411.50
5.3.290.0060.03912.80
5.3.280.0060.03812.71
5.3.270.0110.03412.72
5.3.260.0130.03212.72
5.3.250.0030.03912.72
5.3.240.0050.03812.72
5.3.230.0060.04412.70
5.3.220.0090.03312.68
5.3.210.0050.03812.68
5.3.200.0070.03412.68
5.3.190.0050.04112.67
5.3.180.0070.03612.68
5.3.170.0040.03712.67
5.3.160.0060.03612.67
5.3.150.0060.03612.67
5.3.140.0060.03612.66
5.3.130.0060.04012.66
5.3.120.0040.04112.66
5.3.110.0050.03912.66
5.3.100.0060.03512.13
5.3.90.0060.03612.11
5.3.80.0040.03812.10
5.3.70.0100.03212.10
5.3.60.0080.03312.08
5.3.50.0080.03312.03
5.3.40.0070.03512.03
5.3.30.0080.03211.99
5.3.20.0050.03511.77
5.3.10.0110.03011.73
5.3.00.0060.03611.73
5.2.170.0030.0319.23
5.2.160.0030.0309.23
5.2.150.0030.0319.22
5.2.140.0050.0299.22
5.2.130.0040.0299.18
5.2.120.0060.0289.18
5.2.110.0050.0289.19
5.2.100.0060.0269.19
5.2.90.0070.0309.19
5.2.80.0050.0339.18
5.2.70.0050.0319.18
5.2.60.0060.0329.14
5.2.50.0060.0349.10
5.2.40.0040.0309.08
5.2.30.0040.0339.05
5.2.20.0040.0309.04
5.2.10.0020.0308.95
5.2.00.0050.0288.82
5.1.60.0030.0258.10
5.1.50.0040.0248.10
5.1.40.0070.0218.07
5.1.30.0040.0258.43
5.1.20.0070.0238.44
5.1.10.0040.0258.18
5.1.00.0030.0268.18
5.0.50.0020.0216.65
5.0.40.0040.0186.51
5.0.30.0050.0296.32
5.0.20.0030.0196.29
5.0.10.0020.0206.27
5.0.00.0020.0316.26
4.4.90.0030.0154.78
4.4.80.0040.0144.76
4.4.70.0040.0144.76
4.4.60.0020.0164.76
4.4.50.0020.0164.77
4.4.40.0030.0254.71
4.4.30.0030.0154.75
4.4.20.0010.0174.84
4.4.10.0030.0154.85
4.4.00.0010.0264.76
4.3.110.0030.0154.67
4.3.100.0040.0134.66
4.3.90.0010.0164.64
4.3.80.0030.0244.58
4.3.70.0030.0144.63
4.3.60.0040.0134.62
4.3.50.0020.0164.63
4.3.40.0040.0224.54
4.3.30.0030.0153.28
4.3.20.0030.0153.26
4.3.10.0020.0153.22
4.3.00.0100.0236.80

preferences:
40.39 ms | 401 KiB | 5 Q