3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (version_compare(PHP_VERSION, '7.0.0', '<')) { define('BASIC_TYPE_HINT_REGEX', '#^Argument \d+ passed to .+? must be an instance of ([a-z]+), ([a-z]+) given#i'); function basic_type_hint($err_lvl, $err_msg) { if ($err_lvl == E_RECOVERABLE_ERROR) { if (preg_match(BASIC_TYPE_HINT_REGEX, $err_msg, $matches)) { if ($matches[1] == $matches[2]) { return true; } switch ($matches[1]) { case 'int': return $matches[2] == 'integer'; case 'bool': return $matches[2] == 'boolean'; default: return false; } } } return false; } set_error_handler('basic_type_hint'); } function foo(int $a) { print $a; } foo(42); foo(23);

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.00718.30
8.3.50.0110.00716.56
8.3.40.0060.00918.76
8.3.30.0140.00718.92
8.3.20.0050.00320.34
8.3.10.0040.00423.66
8.3.00.0080.00019.68
8.2.180.0110.00716.32
8.2.170.0070.00718.91
8.2.160.0080.00822.96
8.2.150.0060.00324.18
8.2.140.0030.00624.66
8.2.130.0060.00326.16
8.2.120.0050.00319.54
8.2.110.0060.00322.25
8.2.100.0040.00717.78
8.2.90.0040.00419.25
8.2.80.0060.00318.04
8.2.70.0050.00317.38
8.2.60.0000.00817.91
8.2.50.0000.00918.07
8.2.40.0000.00819.88
8.2.30.0040.00418.00
8.2.20.0000.00917.67
8.2.10.0030.00518.02
8.2.00.0070.00018.05
8.1.280.0120.00325.92
8.1.270.0040.00420.33
8.1.260.0060.00326.35
8.1.250.0030.00528.09
8.1.240.0050.00323.88
8.1.230.0000.01119.14
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0030.00617.23
8.1.190.0080.00017.29
8.1.180.0030.00618.89
8.1.170.0000.00818.58
8.1.160.0040.00421.88
8.1.150.0040.00418.48
8.1.140.0030.00617.21
8.1.130.0040.00417.73
8.1.120.0030.00317.36
8.1.110.0000.00717.25
8.1.100.0030.00317.21
8.1.90.0050.00317.23
8.1.80.0000.00717.34
8.1.70.0020.00517.36
8.1.60.0030.00617.50
8.1.50.0000.00817.43
8.1.40.0040.00417.38
8.1.30.0000.00817.58
8.1.20.0030.00617.50
8.1.10.0030.00517.34
8.1.00.0030.00517.39
8.0.300.0080.00018.77
8.0.290.0070.00017.05
8.0.280.0030.00318.27
8.0.270.0030.00317.12
8.0.260.0060.00017.20
8.0.250.0000.00716.82
8.0.240.0000.00716.79
8.0.230.0070.00016.77
8.0.220.0000.00716.73
8.0.210.0000.00716.82
8.0.200.0000.00616.82
8.0.190.0000.00816.75
8.0.180.0070.00016.79
8.0.170.0060.00316.81
8.0.160.0040.00416.81
8.0.150.0040.00416.85
8.0.140.0070.00016.57
8.0.130.0030.00313.25
8.0.120.0040.00416.73
8.0.110.0080.00016.73
8.0.100.0000.00716.72
8.0.90.0030.00616.73
8.0.80.0120.00916.82
8.0.70.0040.00416.64
8.0.60.0070.00016.57
8.0.50.0000.00916.83
8.0.30.0150.00617.13
8.0.20.0090.01117.40
8.0.10.0040.00416.81
8.0.00.0140.00616.59
7.4.330.0030.00315.03
7.4.320.0000.00616.39
7.4.300.0060.00016.38
7.4.290.0030.00316.55
7.4.280.0040.00416.49
7.4.270.0000.00716.45
7.4.260.0030.00316.58
7.4.250.0030.00516.41
7.4.240.0030.00316.51
7.4.230.0000.00816.31
7.4.220.0070.01516.36
7.4.210.0040.01116.46
7.4.200.0080.00016.44
7.4.160.0060.00916.25
7.4.150.0120.00617.40
7.4.140.0170.00417.86
7.4.130.0040.01416.44
7.4.120.0070.01616.55
7.4.110.0130.00316.52
7.4.100.0030.01016.60
7.4.90.0100.00616.38
7.4.80.0070.01019.39
7.4.70.0100.01316.49
7.4.60.0130.00316.53
7.4.50.0000.00916.51
7.4.40.0090.00616.66
7.4.30.0070.01016.56
7.4.00.0000.01815.04
7.3.330.0000.00713.29
7.3.320.0000.00613.17
7.3.310.0050.00216.13
7.3.300.0000.00716.29
7.3.290.0070.00716.33
7.3.280.0110.00516.31
7.3.270.0150.00317.40
7.3.260.0060.01216.46
7.3.250.0070.01216.48
7.3.240.0070.01016.37
7.3.230.0160.00616.39
7.3.210.0070.01016.23
7.3.200.0130.00316.26
7.3.190.0000.01616.52
7.3.180.0090.00616.32
7.3.170.0120.00616.65
7.3.160.0000.01616.51
7.3.120.0120.00614.78
7.3.110.0100.00714.76
7.3.100.0040.00714.83
7.3.90.0000.00914.96
7.3.80.0000.01015.11
7.3.70.0030.01014.51
7.3.60.0110.00414.56
7.3.50.0030.01014.91
7.3.40.0000.00814.77
7.3.30.0030.00914.96
7.3.20.0100.00716.70
7.3.10.0070.00716.65
7.3.00.0040.01216.75
7.2.330.0120.00616.55
7.2.320.0070.01016.20
7.2.310.0060.01216.20
7.2.300.0170.00016.60
7.2.290.0070.01616.36
7.2.250.0100.01015.26
7.2.240.0130.00714.65
7.2.230.0120.00614.86
7.2.220.0090.00014.80
7.2.210.0130.00015.13
7.2.200.0060.01014.59
7.2.190.0090.00615.11
7.2.180.0030.01015.02
7.2.170.0030.01315.04
7.2.160.0030.00715.05
7.2.150.0070.00716.75
7.2.140.0110.00716.71
7.2.130.0090.00616.73
7.2.120.0030.01116.84
7.2.110.0060.01216.77
7.2.100.0080.00816.77
7.2.90.0030.01616.94
7.2.80.0060.00916.46
7.2.70.0070.01016.92
7.2.60.0080.00816.81
7.2.50.0070.00716.90
7.2.40.0100.00316.70
7.2.30.0040.00816.80
7.2.20.0090.00616.51
7.2.10.0110.00417.00
7.2.00.0030.00918.09
7.1.330.0130.00315.76
7.1.320.0040.01115.76
7.1.310.0000.01215.83
7.1.300.0070.00415.80
7.1.290.0070.01015.90
7.1.280.0030.01215.72
7.1.270.0080.00315.82
7.1.260.0040.00815.79
7.1.250.0090.00315.94
7.1.200.0090.00315.55
7.1.100.0040.00818.01
7.1.70.0060.00617.03
7.1.60.0100.01419.86
7.1.50.0130.01016.95
7.1.00.0030.07722.32
7.0.200.0050.00516.62
7.0.60.0200.07319.93
7.0.50.0030.04017.88
7.0.40.0070.04320.24
7.0.30.0270.05720.06
7.0.20.0470.06320.10
7.0.10.0030.04320.09
7.0.00.0030.08020.33
5.6.280.0070.07020.88
5.6.210.0170.06720.63
5.6.200.0030.06018.19
5.6.190.0000.05020.39
5.6.180.0470.07020.61
5.6.170.0070.04720.50
5.6.160.0030.05020.45
5.6.150.0130.05018.14
5.6.140.0030.06018.19
5.6.130.0130.03318.26
5.6.120.0100.08721.13
5.6.110.0100.08320.97
5.6.100.0030.08320.96
5.6.90.0030.07021.14
5.6.80.0030.06320.51
5.5.350.0200.05020.43
5.5.340.0070.05318.02
5.5.330.0100.08320.37
5.5.320.0330.07320.29
5.5.310.0270.05020.32
5.5.300.0070.08018.03
5.5.290.0100.03317.92
5.5.280.0030.04020.77
5.5.270.0330.05320.76
5.5.260.0170.07720.87
5.5.250.0030.04020.70
5.5.240.0030.03020.27
5.4.450.0570.05019.41
5.4.440.0630.05719.48
5.4.430.0100.05019.46
5.4.420.0070.05719.20
5.4.410.0270.04018.95
5.4.400.0130.04718.86
5.4.390.0170.04318.80
5.4.380.0070.05718.50
5.4.370.0200.04318.73
5.4.360.0070.06318.63
5.4.350.0070.05718.78
5.4.340.0130.06318.73
5.4.320.0070.05718.70
5.4.310.0070.05318.52
5.4.300.0070.05318.57
5.4.290.0200.04018.56
5.4.280.0170.04718.77
5.4.270.0070.05318.54
5.4.260.0130.04718.82
5.4.250.0170.04718.81
5.4.240.0130.05018.78
5.4.230.0170.04318.61
5.4.220.0130.05018.72
5.4.210.0170.05018.57
5.4.200.0100.04716.63
5.4.190.0100.05318.72
5.4.180.0100.05318.45
5.4.170.0200.04318.56
5.4.160.0030.05718.71
5.4.150.0000.06018.67
5.4.140.0000.06016.20
5.4.130.0100.04716.19
5.4.120.0270.05016.44
5.4.110.0000.05716.18
5.4.100.0170.04316.45
5.4.90.0130.04716.35
5.4.80.0100.04716.24
5.4.70.0100.05016.26
5.4.60.0070.05016.30
5.4.50.0030.05316.40
5.4.40.0200.04716.23
5.4.30.0030.05316.39
5.4.20.0030.05716.23
5.4.10.0070.05016.25
5.4.00.0030.05315.89
5.3.290.0300.04314.70
5.3.280.0100.05014.77
5.3.270.0070.05314.80
5.3.260.0130.05314.66
5.3.250.0170.05014.66
5.3.240.0170.04314.79
5.3.230.0100.05014.76
5.3.220.0200.04314.62
5.3.210.0070.05314.62
5.3.200.0130.04714.71
5.3.190.0030.05714.85
5.3.180.0100.05714.60
5.3.170.0070.05014.84
5.3.160.0070.05714.72
5.3.150.0000.06014.62
5.3.140.0070.05314.76
5.3.130.0100.05314.68
5.3.120.0200.04714.73
5.3.110.0100.05314.75
5.3.100.0100.05014.20
5.3.90.0130.04714.05
5.3.80.0030.05714.02
5.3.70.0070.05314.13
5.3.60.0130.04714.05
5.3.50.0130.04314.18
5.3.40.0070.05014.09
5.3.30.0170.04313.93
5.3.20.0100.04713.69
5.3.10.0030.05313.94
5.3.00.0100.06713.77
5.2.170.0030.05011.26
5.2.160.0070.04011.17
5.2.150.0070.04311.19
5.2.140.0130.03711.20
5.2.130.0030.04311.20
5.2.120.0070.04311.14
5.2.110.0030.04311.14
5.2.100.0070.04011.23
5.2.90.0100.04711.24
5.2.80.0100.03711.10
5.2.70.0000.05011.22
5.2.60.0070.04011.07
5.2.50.0070.04311.16
5.2.40.0130.03711.04
5.2.30.0070.04311.05
5.2.20.0100.04311.16
5.2.10.0030.04010.96
5.2.00.0030.04710.83
5.1.60.0100.03010.02
5.1.50.0070.03310.04
5.1.40.0070.03310.01
5.1.30.0030.03710.39
5.1.20.0030.03710.41
5.1.10.0030.03710.16
5.1.00.0030.03710.21
5.0.50.0000.0338.73
5.0.40.0000.0308.61
5.0.30.0100.0378.25
5.0.20.0000.0338.30
5.0.10.0000.0338.26
5.0.00.0100.0378.26
4.4.90.0000.0275.98
4.4.80.0030.0235.97
4.4.70.0070.0235.93
4.4.60.0000.0275.87
4.4.50.0070.0275.95
4.4.40.0030.0435.93
4.4.30.0030.0235.93
4.4.20.0030.0206.05
4.4.10.0070.0175.95
4.4.00.0030.0336.01
4.3.110.0070.0205.92
4.3.100.0030.0205.91
4.3.90.0000.0235.80
4.3.80.0070.0305.83
4.3.70.0070.0175.85
4.3.60.0030.0205.80
4.3.50.0000.0235.87
4.3.40.0070.0305.80
4.3.30.0100.0204.57
4.3.20.0030.0204.58
4.3.10.0030.0234.54
4.3.00.0070.0237.17

preferences:
71.98 ms | 400 KiB | 5 Q