3v4l.org

run code in 300+ PHP versions simultaneously
<?php function array_is_numeric($unsafeArray) { foreach($unsafeArray as $entry) { if (!is_numeric($entry)) { return false; } } return true; } function foo($numeric_OR_array) { if (is_array($numeric_OR_array) and array_is_numeric($numeric_OR_array)) { return "True"; } else { return "False"; } } $testArray = array(1,2,3,4,5); $testArray2 = array(1,2,3,'vier',5); $testNumber = 1; echo '(' . join(', ', $testArray) . ')'; echo ' -- '; echo(foo($testArray)); echo ' -- '; echo(foo($testArray2)); echo ' -- '; echo(foo($testNumber));

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.01116.63
8.3.50.0120.00317.98
8.3.40.0060.00918.84
8.3.30.0080.00818.77
8.3.20.0080.00020.16
8.3.10.0040.00423.66
8.3.00.0040.00419.63
8.2.180.0130.00718.48
8.2.170.0100.00722.96
8.2.160.0080.00619.29
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00422.08
8.2.120.0000.00826.35
8.2.110.0060.00320.35
8.2.100.0070.00619.64
8.2.90.0030.00618.03
8.2.80.0000.00822.27
8.2.70.0080.00018.01
8.2.60.0050.00318.05
8.2.50.0000.00818.10
8.2.40.0060.00320.60
8.2.30.0060.00619.12
8.2.20.0000.00717.93
8.2.10.0050.00218.05
8.2.00.0070.00018.23
8.1.280.0140.00025.92
8.1.270.0000.00822.10
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0080.00023.97
8.1.230.0060.00620.89
8.1.220.0000.00817.79
8.1.210.0000.00818.84
8.1.200.0000.00817.47
8.1.190.0000.00817.40
8.1.180.0090.00018.10
8.1.170.0000.00818.60
8.1.160.0000.00818.80
8.1.150.0000.00720.22
8.1.140.0040.00417.61
8.1.130.0100.00018.95
8.1.120.0030.00517.46
8.1.110.0000.00817.45
8.1.100.0060.00317.52
8.1.90.0040.00417.36
8.1.80.0000.00717.34
8.1.70.0000.00717.46
8.1.60.0000.00717.58
8.1.50.0000.00817.40
8.1.40.0000.00917.54
8.1.30.0000.00917.50
8.1.20.0000.00917.61
8.1.10.0000.00817.51
8.1.00.0060.00317.39
8.0.300.0060.00319.98
8.0.290.0050.00316.75
8.0.280.0070.00018.37
8.0.270.0000.00817.34
8.0.260.0070.00016.69
8.0.250.0000.00716.84
8.0.240.0040.00416.94
8.0.230.0030.00316.97
8.0.220.0070.00016.82
8.0.210.0000.00716.76
8.0.200.0030.00316.84
8.0.190.0060.00316.81
8.0.180.0020.00516.77
8.0.170.0030.00616.92
8.0.160.0000.00716.86
8.0.150.0040.00416.79
8.0.140.0050.00316.87
8.0.130.0060.00013.37
8.0.120.0030.00616.84
8.0.110.0050.00216.71
8.0.100.0070.00016.79
8.0.90.0000.00716.71
8.0.80.0090.01216.84
8.0.70.0040.00416.95
8.0.60.0040.00416.79
8.0.50.0050.00316.76
8.0.30.0130.00416.92
8.0.20.0130.00617.41
8.0.10.0000.00717.07
8.0.00.0160.00916.90
7.4.330.0000.00515.55
7.4.320.0060.00016.52
7.4.300.0000.00616.59
7.4.290.0040.00416.63
7.4.280.0040.00416.51
7.4.270.0070.00016.47
7.4.260.0000.00716.62
7.4.250.0050.00516.46
7.4.240.0040.00416.62
7.4.230.0070.00016.44
7.4.220.0000.00816.61
7.4.210.0120.00716.62
7.4.200.0000.00716.70
7.4.160.0080.01016.54
7.4.150.0120.00617.40
7.4.140.0110.00717.86
7.4.130.0120.00616.63
7.4.120.0120.01016.45
7.4.110.0100.00716.36
7.4.100.0110.00616.47
7.4.90.0140.00316.55
7.4.80.0120.01319.39
7.4.70.0100.00716.61
7.4.60.0170.00016.41
7.4.50.0160.00016.46
7.4.40.0110.00816.33
7.4.00.0060.01015.02
7.3.330.0030.00313.17
7.3.320.0000.00613.16
7.3.310.0050.00216.34
7.3.300.0030.00316.17
7.3.290.0030.00316.16
7.3.280.0100.00716.29
7.3.270.0070.01017.40
7.3.260.0060.01316.44
7.3.250.0080.01016.37
7.3.240.0120.00916.58
7.3.230.0120.00316.54
7.3.210.0150.00316.48
7.3.200.0110.00516.26
7.3.190.0070.01016.37
7.3.180.0070.01016.68
7.3.170.0130.00316.45
7.3.160.0100.00716.56
7.3.120.0090.00914.84
7.3.110.0070.00714.87
7.3.100.0040.01114.74
7.3.90.0030.00615.04
7.3.80.0030.01014.93
7.3.70.0130.00014.54
7.3.60.0070.01114.82
7.3.50.0120.00314.92
7.3.40.0100.00314.64
7.3.30.0030.01014.80
7.3.20.0000.00916.30
7.3.10.0040.00816.86
7.3.00.0090.00316.77
7.2.330.0040.01416.70
7.2.320.0070.01216.76
7.2.310.0080.00816.53
7.2.300.0070.01016.81
7.2.290.0110.01216.69
7.2.250.0100.00615.27
7.2.240.0070.01315.03
7.2.230.0030.01014.69
7.2.220.0090.00014.95
7.2.210.0080.00414.99
7.2.200.0000.01515.00
7.2.190.0060.00815.13
7.2.180.0070.00714.98
7.2.170.0000.01715.11
7.2.130.0030.01016.71
7.2.120.0030.00916.77
7.2.110.0060.00916.63
7.2.100.0030.00616.54
7.2.90.0000.01116.71
7.2.80.0120.00316.93
7.2.70.0100.00016.90
7.2.60.0020.01116.78
7.2.50.0030.01016.87
7.2.40.0100.00316.71
7.2.30.0070.00716.60
7.2.20.0050.01218.49
7.2.10.0120.00818.30
7.2.00.0030.01018.45
7.1.330.0070.00715.39
7.1.320.0030.00915.59
7.1.310.0000.01115.73
7.1.300.0110.00615.90
7.1.290.0090.00315.72
7.1.280.0080.00415.73
7.1.270.0070.00715.38
7.1.260.0100.00615.54
7.1.250.0060.00615.77
7.1.200.0070.00715.68
7.1.140.0270.01018.79
7.1.130.0000.01418.69
7.1.120.0200.00818.67
7.1.110.0120.00618.13
7.1.100.0080.00817.96
7.1.90.0100.00718.17
7.1.80.0070.01117.97
7.1.70.0060.01216.86
7.1.60.0160.02034.98
7.1.50.0200.01734.49
7.1.40.0200.01734.54
7.1.30.0230.01534.55
7.1.20.0200.02034.54
7.1.10.0030.01016.56
7.1.00.0150.00416.55

preferences:
58.41 ms | 400 KiB | 5 Q