3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo($v) { if (!is_numeric($v)) { invalidArgument(__FUNCTION__, 'numeric', 1, gettype($v)); } echo $v; } function invalidArgument($func, $type, $argN, $argT) { $db = debug_backtrace(); user_error( sprintf( "Argument %d passed to %s() must be a valid %s, %s given in %s on line %d", $argN, $func, $type, $argT, $db[1]['file'], $db[1]['line'] ), E_USER_ERROR ); } foo("9999999999999999999999999999999"); foo("abc");

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.4.10.0070.01018.05
8.3.140.0080.00016.59
8.3.130.0030.00618.34
8.3.120.0140.00018.61
8.3.110.0060.00320.94
8.3.100.0040.00424.06
8.3.90.0090.00926.77
8.3.80.0060.00318.55
8.3.70.0140.00318.40
8.3.60.0090.00916.75
8.3.50.0100.01022.09
8.3.40.0040.01118.67
8.3.30.0070.00719.27
8.3.20.0130.00320.20
8.3.10.0000.00721.92
8.3.00.0040.00419.25
8.2.260.0030.00618.23
8.2.250.0090.00018.38
8.2.240.0000.01117.23
8.2.230.0060.01322.58
8.2.220.0100.00037.54
8.2.210.0120.00626.77
8.2.200.0060.00318.54
8.2.190.0150.00616.75
8.2.180.0140.00418.36
8.2.170.0040.01218.96
8.2.160.0070.00722.96
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0030.00626.16
8.2.120.0080.00019.48
8.2.110.0000.01019.45
8.2.100.0030.01017.87
8.2.90.0050.00319.22
8.2.80.0000.00817.97
8.2.70.0000.00817.75
8.2.60.0110.00018.05
8.2.50.0050.00318.07
8.2.40.0040.00420.07
8.2.30.0000.00718.07
8.2.20.0040.00417.80
8.2.10.0040.00418.11
8.2.00.0080.00017.70
8.1.310.0030.00618.02
8.1.300.0080.00020.25
8.1.290.0090.00018.88
8.1.280.0060.01325.92
8.1.270.0160.00024.66
8.1.260.0080.00026.35
8.1.250.0000.00728.09
8.1.240.0030.00622.62
8.1.230.0120.00017.58
8.1.220.0050.00317.74
8.1.210.0050.00318.77
8.1.200.0000.01017.35
8.1.190.0040.00417.35
8.1.180.0040.00418.10
8.1.170.0080.00020.42
8.1.160.0000.00721.93
8.1.150.0000.00818.75
8.1.140.0000.00717.36
8.1.130.0040.00417.72
8.1.120.0070.00017.48
8.1.110.0030.00517.47
8.1.100.0000.00717.28
8.1.90.0070.00017.35
8.1.80.0000.00817.50
8.1.70.0000.00717.36
8.1.60.0090.00017.43
8.1.50.0050.00317.45
8.1.40.0090.00017.52
8.1.30.0030.00517.61
8.1.20.0060.00317.61
8.1.10.0080.00017.58
8.1.00.0040.00417.38
8.0.300.0040.00418.77
8.0.290.0060.00316.75
8.0.280.0000.00718.50
8.0.270.0040.00416.88
8.0.260.0000.00717.18
8.0.250.0000.00817.05
8.0.240.0000.00817.03
8.0.230.0040.00416.89
8.0.220.0030.00316.83
8.0.210.0040.00416.90
8.0.200.0030.00317.03
8.0.190.0000.00717.01
8.0.180.0000.00716.98
8.0.170.0030.00516.97
8.0.160.0040.00416.94
8.0.150.0040.00416.83
8.0.140.0030.00516.91
8.0.130.0000.00613.41
8.0.120.0040.00416.82
8.0.110.0000.00716.95
8.0.100.0070.00017.02
8.0.90.0000.00816.82
8.0.80.0090.00616.91
8.0.70.0040.00416.95
8.0.60.0050.00316.82
8.0.50.0000.00716.80
8.0.30.0130.01017.07
8.0.20.0100.01117.40
8.0.10.0040.00417.03
8.0.00.0070.01416.89
7.4.330.0000.00515.10
7.4.320.0060.00016.52
7.4.300.0040.00416.42
7.4.290.0040.00416.51
7.4.280.0030.00616.52
7.4.270.0050.00216.44
7.4.260.0000.00716.48
7.4.250.0000.00916.55
7.4.240.0020.00616.46
7.4.230.0030.00316.70
7.4.220.0030.01416.58
7.4.210.0110.00916.63
7.4.200.0070.00016.70
7.4.160.0030.01316.38
7.4.150.0090.00917.40
7.4.140.0090.01117.86
7.4.130.0120.00616.56
7.4.120.0090.00816.49
7.4.110.0120.01216.37
7.4.100.0120.01216.47
7.4.90.0060.01016.50
7.4.80.0090.01219.39
7.4.70.0160.00016.65
7.4.60.0120.00416.45
7.4.50.0000.00816.41
7.4.40.0060.01016.62
7.4.30.0100.00716.46
7.4.00.0060.00914.78
7.3.330.0060.00013.36
7.3.320.0110.00413.41
7.3.310.0070.00016.40
7.3.300.0030.00316.32
7.3.290.0060.01016.43
7.3.280.0090.00816.43
7.3.270.0180.00717.40
7.3.260.0160.00316.46
7.3.250.0110.00816.42
7.3.240.0110.00716.69
7.3.230.0070.01016.39
7.3.210.0120.00416.41
7.3.200.0090.00919.39
7.3.190.0060.00916.34
7.3.180.0120.00416.50
7.3.170.0100.01316.54
7.3.160.0130.00916.57
7.3.10.0080.00816.45
7.3.00.0070.01416.54
7.2.330.0070.01016.67
7.2.320.0140.01116.43
7.2.310.0140.00316.78
7.2.300.0140.00716.73
7.2.290.0060.01316.80
7.2.130.0050.01017.03
7.2.120.0070.00716.54
7.2.110.0060.00317.09
7.2.100.0040.01116.83
7.2.90.0040.01116.82
7.2.80.0120.00616.60
7.2.70.0060.01216.16
7.2.60.0050.01016.59
7.2.50.0070.00416.71
7.2.40.0050.01116.81
7.2.30.0110.01116.75
7.2.20.0080.00416.85
7.2.10.0040.01616.95
7.2.00.0060.00718.11
7.1.250.0000.01615.61
7.1.200.0070.00715.77
7.1.100.0030.00718.03
7.1.70.0040.00417.09
7.1.60.0070.01519.50
7.1.50.0030.02117.11
7.1.00.0070.07322.45
7.0.200.0120.00616.77
7.0.140.0100.07022.10
7.0.100.0100.07719.90
7.0.90.0030.08719.89
7.0.80.0200.04319.91
7.0.70.0430.07019.98
7.0.60.0070.04719.98
7.0.50.0300.07320.33
7.0.40.0170.08320.13
7.0.30.0100.05320.18
7.0.20.0130.07320.15
7.0.10.0070.07320.03
7.0.00.0130.07720.07
5.6.280.0070.07021.13
5.6.250.0000.08720.54
5.6.240.0030.09020.57
5.6.230.0070.08320.56
5.6.220.0000.08720.62
5.6.210.0130.07020.62
5.6.200.0130.08021.06
5.6.190.0130.04320.95
5.6.180.0100.08321.18
5.6.170.0130.07721.17
5.6.160.0100.07320.95
5.6.150.0000.08721.05
5.6.140.0070.08021.07
5.6.130.0100.08321.10
5.6.120.0100.08021.06
5.6.110.0030.09021.11
5.6.100.0170.05021.02
5.6.90.0030.08320.99
5.6.80.0000.04320.40
5.6.70.0100.07320.49
5.6.60.0100.07320.31
5.6.50.0100.06020.34
5.6.40.0030.04020.31
5.6.30.0000.07320.33
5.6.20.0070.07020.32
5.6.10.0100.06720.38
5.6.00.0070.07720.46
5.5.380.0100.07320.42
5.5.370.0100.07720.42
5.5.360.0270.06320.41
5.5.350.0030.08020.42
5.5.340.0100.08320.81
5.5.330.0200.06720.89
5.5.320.0100.08020.94
5.5.310.0130.08020.74
5.5.300.0100.07720.83
5.5.290.0070.05020.87
5.5.280.0100.07720.88
5.5.270.0000.06720.64
5.5.260.0100.08020.91
5.5.250.0000.08720.74
5.5.240.0030.04020.19
5.5.230.0070.06720.27
5.5.220.0070.07020.26
5.5.210.0070.06320.21
5.5.200.0030.05020.16
5.5.190.0000.04320.25
5.5.180.0070.07720.18
5.5.160.0100.06320.15
5.5.150.0170.07020.23
5.5.140.0170.06720.21
5.5.130.0130.06020.29
5.5.120.0200.02020.16
5.5.110.0100.07320.08
5.5.100.0000.08020.09
5.5.90.0100.07720.10
5.5.80.0100.06719.98
5.5.70.0030.07320.10
5.5.60.0100.05019.90
5.5.50.0170.06320.12
5.5.40.0170.05320.05
5.5.30.0030.04320.08
5.5.20.0200.02320.04
5.5.10.0030.03720.05
5.5.00.0130.07319.98
5.4.450.0100.07019.19
5.4.440.0070.08019.49
5.4.430.0070.06319.17
5.4.420.0030.05319.37
5.4.410.0030.05019.26
5.4.400.0100.02719.24
5.4.390.0070.07718.88
5.4.380.0030.04019.21
5.4.370.0130.04318.88
5.4.360.0070.04718.88
5.4.350.0070.06319.04
5.4.340.0100.04718.85
5.4.320.0070.04318.95
5.4.310.0130.07019.12
5.4.300.0130.06319.27
5.4.290.0070.06719.05
5.4.280.0100.06019.23
5.4.270.0100.08019.09
5.4.260.0070.06018.84
5.4.250.0070.07719.13
5.4.240.0030.03719.02
5.4.230.0130.07019.16
5.4.220.0070.06718.90
5.4.210.0070.07319.16
5.4.200.0070.03019.02
5.4.190.0100.07019.02
5.4.180.0030.06018.87
5.4.170.0070.07319.15
5.4.160.0070.04019.03
5.4.150.0030.07019.11
5.4.140.0070.03316.41
5.4.130.0000.06716.25
5.4.120.0100.04716.32
5.4.110.0070.06716.54
5.4.100.0030.06316.41
5.4.90.0070.06316.57
5.4.80.0100.06316.43
5.4.70.0000.03716.51
5.4.60.0000.03716.46
5.4.50.0030.07016.41
5.4.40.0030.04016.49
5.4.30.0030.07716.48
5.4.20.0100.06716.30
5.4.10.0100.06716.46
5.4.00.0000.04015.81
5.3.290.0030.06714.78
5.3.280.0070.03314.57
5.3.270.0000.04714.55
5.3.260.0030.06314.63
5.3.250.0030.07714.59
5.3.240.0100.07014.59
5.3.230.0030.05314.66
5.3.220.0100.07314.61
5.3.210.0030.06314.58
5.3.200.0000.06714.55
5.3.190.0100.07714.61
5.3.180.0000.06014.70
5.3.170.0070.07314.63
5.3.160.0100.07314.57
5.3.150.0030.03314.54
5.3.140.0070.06314.49
5.3.130.0030.07714.69
5.3.120.0030.04714.54
5.3.110.0030.07014.68
5.3.100.0000.04313.99
5.3.90.0000.04314.00
5.3.80.0100.05713.95
5.3.70.0000.04713.95
5.3.60.0070.07313.92
5.3.50.0030.04314.02
5.3.40.0000.04713.96
5.3.30.0030.04313.85
5.3.20.0030.04013.63
5.3.10.0100.06313.67
5.3.00.0100.04013.75
5.2.170.0030.05311.20
5.2.160.0130.05011.18
5.2.150.0070.06011.17
5.2.140.0030.06311.13
5.2.130.0030.05011.13
5.2.120.0100.05711.23
5.2.110.0130.03311.13
5.2.100.0070.05711.17
5.2.90.0030.04311.21
5.2.80.0070.05311.13
5.2.70.0170.05011.22
5.2.60.0030.06311.13
5.2.50.0030.03311.13
5.2.40.0030.06011.13
5.2.30.0030.05711.13
5.2.20.0070.05711.13
5.2.10.0100.06011.13
5.2.00.0030.06311.13
5.1.60.0070.04711.13
5.1.50.0000.06011.13
5.1.40.0070.02711.13
5.1.30.0070.06011.13
5.1.20.0030.05311.13
5.1.10.0030.06011.13
5.1.00.0030.05311.13
5.0.50.0000.04711.13
5.0.40.0000.04311.13
5.0.30.0000.06311.13
5.0.20.0070.04011.13
5.0.10.0070.02711.13
5.0.00.0030.06311.13
4.4.90.0030.02711.13
4.4.80.0070.01311.13
4.4.70.0000.03711.13
4.4.60.0000.03711.13
4.4.50.0030.03711.13
4.4.40.0000.03711.13
4.4.30.0030.01711.13
4.4.20.0030.03311.13
4.4.10.0030.02711.13
4.4.00.0100.04011.13
4.3.110.0030.02311.13
4.3.100.0000.03011.13
4.3.90.0030.02311.13
4.3.80.0130.04311.13
4.3.70.0000.03711.13
4.3.60.0030.03011.13
4.3.50.0070.03011.13
4.3.40.0030.03311.13
4.3.30.0030.03011.13
4.3.20.0000.03311.13
4.3.10.0000.02311.13
4.3.00.0070.03011.13

preferences:
28.71 ms | 403 KiB | 5 Q