3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Foo { interface FooInterface { public function foo(string $str); } } namespace Bar { use Foo\FooInterface; class BarClass implements FooInterface { public function foo(string $str) { } } if (version_compare(PHP_VERSION, '7.0', '<')) { function type_hint($code, $error) { if (strpos($error, 'string, string') !== false) { return true; } if (strpos($error, 'int, integer') !== false) { return true; } if (strpos($error, 'bool, boolean') !== false) { return true; } if (strpos($error, 'float, double') !== false) { return true; } return false; } } set_error_handler('type_hint', E_RECOVERABLE_ERROR); }

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.84
8.3.50.0090.00916.25
8.3.40.0130.00718.88
8.3.30.0150.00018.64
8.3.20.0080.00018.87
8.3.10.0080.00019.73
8.3.00.0080.00020.89
8.2.180.0070.00718.41
8.2.170.0100.01022.96
8.2.160.0100.00319.08
8.2.150.0070.00024.18
8.2.140.0040.00424.66
8.2.130.0050.00321.07
8.2.120.0060.00326.35
8.2.110.0140.00319.27
8.2.100.0120.00017.92
8.2.90.0050.00319.21
8.2.80.0000.00817.97
8.2.70.0060.00317.63
8.2.60.0040.00817.79
8.2.50.0060.00318.10
8.2.40.0080.00020.62
8.2.30.0030.00520.57
8.2.20.0070.00017.80
8.2.10.0060.00318.06
8.2.00.0000.00818.14
8.1.280.0070.00725.92
8.1.270.0000.00823.69
8.1.260.0040.00428.09
8.1.250.0050.00328.09
8.1.240.0000.01023.92
8.1.230.0000.01217.52
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0030.00617.23
8.1.190.0000.00817.13
8.1.180.0000.00918.10
8.1.170.0040.00418.55
8.1.160.0030.00518.98
8.1.150.0000.00718.77
8.1.140.0050.00317.32
8.1.130.0000.00717.71
8.1.120.0040.00417.33
8.1.110.0040.00417.32
8.1.100.0000.00917.51
8.1.90.0060.00317.44
8.1.80.0000.00717.42
8.1.70.0000.00917.41
8.1.60.0000.00817.56
8.1.50.0050.00517.54
8.1.40.0000.00917.46
8.1.30.0060.00317.67
8.1.20.0040.00417.67
8.1.10.0040.00417.26
8.1.00.0020.00517.37
8.0.300.0080.00018.77
8.0.290.0000.00716.75
8.0.280.0000.00718.41
8.0.270.0050.00216.98
8.0.260.0110.00017.33
8.0.250.0070.00017.09
8.0.240.0030.00316.94
8.0.230.0030.00617.07
8.0.220.0050.00316.96
8.0.210.0030.00316.97
8.0.200.0070.00016.91
8.0.190.0000.00717.09
8.0.180.0000.00816.93
8.0.170.0050.00317.03
8.0.160.0050.00317.07
8.0.150.0030.00716.93
8.0.140.0030.00616.96
8.0.130.0050.00013.38
8.0.120.0030.00516.98
8.0.110.0040.00416.97
8.0.100.0080.00017.03
8.0.90.0040.00416.86
8.0.80.0060.01017.05
8.0.70.0050.00217.05
8.0.60.0000.00716.98
8.0.50.0090.00016.84
8.0.30.0090.00717.18
8.0.20.0100.01117.40
8.0.10.0000.00716.87
8.0.00.0090.01216.79
7.4.330.0060.00015.08
7.4.320.0000.00716.52
7.4.300.0040.00416.47
7.4.290.0060.00316.45
7.4.280.0070.00016.49
7.4.270.0000.00716.56
7.4.260.0040.00416.43
7.4.250.0000.00816.48
7.4.240.0000.00716.47
7.4.230.0070.00016.36
7.4.220.0000.02116.46
7.4.210.0110.00316.55
7.4.200.0000.00716.51
7.4.160.0080.00816.52
7.4.150.0110.00717.40
7.4.140.0130.01117.86
7.4.130.0060.01116.54
7.4.120.0140.00516.48
7.4.110.0030.01316.33
7.4.100.0070.01016.57
7.4.90.0070.01016.56
7.4.80.0100.01019.39
7.4.70.0120.00416.41
7.4.60.0080.01116.47
7.4.50.0060.01316.32
7.4.40.0100.00716.54
7.4.30.0040.01316.50
7.4.00.0070.00714.96
7.3.330.0050.00313.07
7.3.320.0050.00013.21
7.3.310.0040.00416.24
7.3.300.0070.00016.14
7.3.290.0090.00916.26
7.3.280.0050.01016.22
7.3.270.0120.00617.40
7.3.260.0080.01616.43
7.3.250.0140.00516.36
7.3.240.0080.01116.42
7.3.230.0100.00716.39
7.3.210.0000.01616.55
7.3.200.0110.00616.54
7.3.190.0090.01216.39
7.3.180.0040.01216.25
7.3.170.0100.00616.39
7.3.160.0070.01016.23
7.2.330.0090.00916.43
7.2.320.0070.01116.52
7.2.310.0030.01416.65
7.2.300.0130.00916.49
7.2.290.0140.00316.38
7.2.110.0060.00616.66
7.2.60.0150.00016.40
7.2.00.0000.01519.01
7.1.200.0030.00615.61
7.1.100.0000.01217.90
7.1.70.0060.00917.01
7.1.60.0140.01120.41
7.1.50.0110.01416.91
7.1.00.0070.07322.36
7.0.200.0040.00816.54
7.0.60.0170.07721.77
7.0.50.0100.04317.89
7.0.40.0200.05320.36
7.0.30.0070.07020.36
7.0.20.0270.05720.36
7.0.10.0200.05320.32
7.0.00.0100.06720.33
5.6.210.0030.06320.76
5.6.200.0070.07018.16
5.6.190.0270.05020.95
5.6.180.0170.05721.17
5.6.170.0130.06321.17
5.6.160.0100.06721.04
5.6.150.0170.05721.11
5.6.140.0130.06321.03
5.6.130.0200.05321.04
5.6.120.0100.06321.20
5.6.110.0100.06021.07
5.6.100.0300.06021.04
5.6.90.0270.06321.09
5.6.80.0500.06020.52
5.6.70.0070.06020.47
5.6.60.0170.05720.47
5.6.50.0470.07020.48
5.6.40.0370.05020.45
5.6.30.0330.05320.46
5.6.20.0300.05320.38
5.6.10.0330.05020.44
5.6.00.0370.05020.48
5.5.350.0300.05720.47
5.5.340.0030.04317.98
5.5.330.0270.04720.84
5.5.320.0130.06020.96
5.5.310.0170.05320.86
5.5.300.0270.04720.84
5.5.290.0300.04720.84
5.5.280.0170.05721.00
5.5.270.0100.06020.91
5.5.260.0170.06321.02
5.5.250.0500.06320.67
5.5.240.0400.05320.25
5.5.230.0270.05720.08
5.5.220.0470.04720.25
5.5.210.0400.05020.23
5.5.200.0330.05720.21
5.5.190.0330.05320.21
5.5.180.0400.05020.36
5.5.160.0370.04320.20
5.5.150.0470.05320.36
5.5.140.0400.05020.29
5.5.130.0300.05720.29
5.5.120.0370.05720.20
5.5.110.0330.05020.26
5.5.100.0500.05020.12
5.5.90.0300.05320.12
5.5.80.0300.05320.20
5.5.70.0170.06720.15
5.5.60.0270.05320.15
5.5.50.0270.05320.23
5.5.40.0230.06320.07
5.5.30.0370.05020.03
5.5.20.0330.05320.15
5.5.10.0300.05020.09
5.5.00.0170.04720.00

preferences:
55.09 ms | 400 KiB | 5 Q