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 $log; const ARR = ['Hello', ' ', 'World!']; public function __construct(Log $log) { $this->log = $log; } public function run() { $this->log->alert(SELF::ARR[0] . SELF::ARR[1] . SELF::ARR[2]); } } $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.0170.00018.68
8.3.50.0170.00522.06
8.3.40.0090.00618.69
8.3.30.0100.00319.23
8.3.20.0040.00420.17
8.3.10.0000.01423.44
8.3.00.0050.00319.50
8.2.180.0090.00616.75
8.2.170.0110.00422.96
8.2.160.0070.00720.39
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0000.01020.96
8.2.110.0030.00721.98
8.2.100.0070.00417.63
8.2.90.0000.00719.34
8.2.80.0000.00817.97
8.2.70.0030.00617.63
8.2.60.0000.00817.93
8.2.50.0050.00318.07
8.2.40.0060.00318.12
8.2.30.0000.00818.11
8.2.20.0000.00817.73
8.2.10.0000.00817.93
8.2.00.0050.00317.64
8.1.280.0100.01025.92
8.1.270.0000.00821.92
8.1.260.0070.00026.35
8.1.250.0030.00328.09
8.1.240.0060.00323.97
8.1.230.0040.00819.02
8.1.220.0050.00317.74
8.1.210.0080.00018.77
8.1.200.0000.01117.35
8.1.190.0040.00417.21
8.1.180.0000.00818.10
8.1.170.0050.00318.55
8.1.160.0000.00722.02
8.1.150.0050.00218.88
8.1.140.0040.00417.32
8.1.130.0030.00317.76
8.1.120.0000.00717.42
8.1.110.0000.00717.38
8.1.100.0040.00417.36
8.1.90.0020.00517.46
8.1.80.0040.00417.34
8.1.70.0030.00317.42
8.1.60.0090.00317.58
8.1.50.0000.00817.40
8.1.40.0080.00017.49
8.1.30.0060.00317.60
8.1.20.0040.00417.64
8.1.10.0070.00017.55
8.1.00.0030.00517.55
8.0.300.0040.00418.77
8.0.290.0000.00816.75
8.0.280.0040.00418.45
8.0.270.0000.00717.14
8.0.260.0060.00017.31
8.0.250.0000.00616.89
8.0.240.0080.00016.94
8.0.230.0000.00716.86
8.0.220.0030.00317.00
8.0.210.0000.00716.86
8.0.200.0030.00316.84
8.0.190.0040.00417.00
8.0.180.0070.00016.90
8.0.170.0000.00816.99
8.0.160.0030.00516.97
8.0.150.0040.00416.83
8.0.140.0070.00016.88
8.0.130.0000.00613.39
8.0.120.0000.00816.97
8.0.110.0040.00416.87
8.0.100.0080.00017.02
8.0.90.0000.00816.86
8.0.80.0150.00716.91
8.0.70.0000.00816.75
8.0.60.0000.00716.92
8.0.50.0050.00217.02
8.0.30.0120.00917.25
8.0.20.0060.01317.40
8.0.10.0040.00416.93
8.0.00.0090.00816.80
7.4.330.0000.00515.02
7.4.320.0030.00316.50
7.4.300.0030.00316.61
7.4.290.0030.00616.52
7.4.280.0000.00716.48
7.4.270.0040.00416.52
7.4.260.0040.00416.48
7.4.250.0080.00016.54
7.4.240.0040.00416.52
7.4.230.0060.00016.40
7.4.220.0060.01316.60
7.4.210.0000.01716.60
7.4.200.0040.00416.53
7.4.160.0140.00716.58
7.4.150.0120.00617.40
7.4.140.0110.00517.86
7.4.130.0120.00516.53
7.4.120.0110.00816.48
7.4.110.0160.00616.61
7.4.100.0100.00716.59
7.4.90.0140.00716.58
7.4.80.0100.01319.39
7.4.70.0070.01616.46
7.4.60.0060.01016.74
7.4.50.0000.00716.34
7.4.40.0140.00916.43
7.4.30.0090.00616.58
7.3.330.0000.00513.02
7.3.320.0050.00012.99
7.3.310.0030.00316.37
7.3.300.0000.00816.01
7.3.290.0090.00716.17
7.3.280.0090.00916.18
7.3.270.0130.00917.40
7.3.260.0220.00016.22
7.3.250.0120.00816.34
7.3.240.0110.00716.25
7.3.230.0040.01316.42
7.3.210.0030.01416.39
7.3.200.0120.00619.39
7.3.190.0100.00616.31
7.3.180.0120.00916.02
7.3.170.0120.00316.38
7.3.160.0080.00816.30
7.2.330.0140.00516.42
7.2.320.0050.01316.45
7.2.310.0130.00316.46
7.2.300.0060.01116.47
7.2.290.0150.00416.23
5.4.340.0230.04319.16
5.4.320.0330.06719.20
5.4.310.0270.07019.14
5.4.300.0270.04719.24
5.4.290.0230.05319.09
5.4.280.0230.04719.18
5.4.270.0230.04318.94
5.4.260.0330.07019.19
5.4.250.0400.06018.85
5.4.240.0300.03719.12
5.4.230.0270.03719.21
5.4.220.0270.03318.87
5.4.210.0230.04319.30
5.4.200.0270.04719.18
5.4.190.0230.03719.13
5.4.180.0270.05018.84
5.4.170.0300.04319.14
5.4.160.0330.05319.18
5.4.150.0330.03019.29
5.4.140.0300.06716.33
5.4.130.0370.06316.47
5.4.120.0230.04716.33
5.4.110.0230.03316.42
5.4.100.0270.06716.33
5.4.90.0270.07016.31
5.4.80.0230.04316.38
5.4.70.0370.05316.41
5.4.60.0270.05316.22
5.4.50.0330.05016.42
5.4.40.0270.03316.53
5.4.30.0200.04316.34
5.4.20.0270.04316.50
5.4.10.0300.06716.47
5.4.00.0270.04315.80
5.3.290.0270.04314.59
5.3.280.0300.05714.52
5.3.270.0200.07714.53
5.3.260.0370.06014.68
5.3.250.0270.05314.72
5.3.240.0270.07014.64
5.3.230.0230.05014.67
5.3.220.0300.06314.57
5.3.210.0230.07314.47
5.3.200.0200.03714.59
5.3.190.0230.03714.57
5.3.180.0230.04714.55
5.3.170.0270.05014.54
5.3.160.0200.08314.79
5.3.150.0300.07714.65
5.3.140.0270.05314.46
5.3.130.0270.07714.51
5.3.120.0170.05014.47
5.3.110.0330.03314.46
5.3.100.0400.06314.06
5.3.90.0230.05314.07
5.3.80.0330.06714.07
5.3.70.0300.05313.99
5.3.60.0230.04714.16
5.3.50.0330.05013.88
5.3.40.0300.05013.86
5.3.30.0270.06013.88
5.3.20.0270.05313.62
5.3.10.0300.04313.68
5.3.00.0230.06313.55
5.2.170.0300.04311.07
5.2.160.0270.04711.16
5.2.150.0200.06311.37
5.2.140.0270.06011.05
5.2.130.0270.05711.23
5.2.120.0230.06311.12
5.2.110.0230.05311.13
5.2.100.0230.04711.26
5.2.90.0300.05311.02
5.2.80.0230.03711.01
5.2.70.0230.03711.02
5.2.60.0230.03711.13
5.2.50.0330.05010.98
5.2.40.0200.06011.08
5.2.30.0300.04711.09
5.2.20.0330.02311.18
5.2.10.0230.05310.95
5.2.00.0170.06310.72
5.1.60.0170.0279.88
5.1.50.0200.0479.90
5.1.40.0130.03310.13
5.1.30.0130.03310.25
5.1.20.0200.04710.37
5.1.10.0270.04310.23
5.1.00.0230.04310.13
5.0.50.0100.0239.88
5.0.40.0200.0339.88
5.0.30.0130.0509.88
5.0.20.0030.0539.88
5.0.10.0130.0439.88
5.0.00.0130.0609.88
4.4.90.0130.0239.88
4.4.80.0100.0309.88
4.4.70.0130.0309.88
4.4.60.0070.0379.88
4.4.50.0070.0239.88
4.4.40.0070.0279.88
4.4.30.0130.0239.88
4.4.20.0170.0239.88
4.4.10.0130.0279.88
4.4.00.0130.0439.88
4.3.110.0170.0279.88
4.3.100.0130.0179.88
4.3.90.0070.0309.88
4.3.80.0100.0409.88
4.3.70.0070.0309.88
4.3.60.0070.0309.88
4.3.50.0070.0239.88
4.3.40.0130.0509.88
4.3.30.0070.0309.88
4.3.20.0030.0309.88
4.3.10.0030.0409.88
4.3.00.0030.0379.88

preferences:
38.85 ms | 401 KiB | 5 Q