3v4l.org

run code in 300+ PHP versions simultaneously
<?php function array_is_numerical($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.0200.00716.25
8.3.50.0110.00418.09
8.3.40.0080.00818.71
8.3.30.0110.00418.63
8.3.20.0070.00020.16
8.3.10.0000.00823.58
8.3.00.0040.00419.56
8.2.180.0100.01018.38
8.2.170.0100.00722.96
8.2.160.0100.00319.40
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0060.00322.20
8.2.120.0070.00026.35
8.2.110.0030.00620.43
8.2.100.0040.00917.91
8.2.90.0080.00018.02
8.2.80.0050.00320.59
8.2.70.0080.00017.92
8.2.60.0060.00318.04
8.2.50.0040.00418.10
8.2.40.0060.00320.58
8.2.30.0090.00019.24
8.2.20.0000.00718.00
8.2.10.0000.00718.13
8.2.00.0030.00418.20
8.1.280.0120.00325.92
8.1.270.0070.00022.05
8.1.260.0060.00326.35
8.1.250.0080.00028.09
8.1.240.0040.00423.96
8.1.230.0090.00320.63
8.1.220.0040.00417.74
8.1.210.0000.00918.78
8.1.200.0000.00917.35
8.1.190.0030.00517.13
8.1.180.0060.00318.10
8.1.170.0000.00818.59
8.1.160.0050.00218.80
8.1.150.0070.00020.26
8.1.140.0040.00417.67
8.1.130.0100.00019.05
8.1.120.0040.00417.49
8.1.110.0040.00417.41
8.1.100.0040.00417.47
8.1.90.0040.00417.40
8.1.80.0050.00317.42
8.1.70.0070.00017.45
8.1.60.0050.00317.61
8.1.50.0000.00817.44
8.1.40.0080.00017.61
8.1.30.0060.00317.67
8.1.20.0050.00217.59
8.1.10.0000.00817.59
8.1.00.0030.00517.36
8.0.300.0060.00320.16
8.0.290.0040.00416.88
8.0.280.0070.00018.37
8.0.270.0040.00417.16
8.0.260.0030.00516.88
8.0.250.0000.00716.95
8.0.240.0070.00016.90
8.0.230.0000.00716.91
8.0.220.0040.00416.97
8.0.210.0000.00716.90
8.0.200.0060.00017.04
8.0.190.0040.00417.00
8.0.180.0000.00816.95
8.0.170.0040.00416.96
8.0.160.0040.00416.87
8.0.150.0040.00416.85
8.0.140.0000.00716.80
8.0.130.0000.00513.42
8.0.120.0040.00416.78
8.0.110.0040.00416.74
8.0.100.0000.00716.98
8.0.90.0070.00016.77
8.0.80.0070.01416.98
8.0.70.0000.00716.76
8.0.60.0050.00216.99
8.0.50.0080.00016.89
8.0.30.0080.00817.10
8.0.20.0140.00817.40
8.0.10.0000.00717.11
8.0.00.0120.00616.89
7.4.330.0000.00615.55
7.4.320.0030.00316.40
7.4.300.0060.00016.51
7.4.290.0040.00416.59
7.4.280.0040.00416.57
7.4.270.0000.00816.35
7.4.260.0070.00016.38
7.4.250.0060.00316.39
7.4.240.0070.00016.50
7.4.230.0030.00316.38
7.4.220.0000.00716.66
7.4.210.0100.00816.57
7.4.200.0000.00816.57
7.4.160.0120.00616.45
7.4.150.0120.00617.40
7.4.140.0090.00817.86
7.4.130.0120.00916.42
7.4.120.0110.01016.54
7.4.110.0100.00716.41
7.4.100.0100.00716.57
7.4.90.0120.00616.55
7.4.80.0060.01619.39
7.4.70.0140.00416.43
7.4.60.0100.00716.70
7.4.50.0120.00316.46
7.4.40.0100.00716.66
7.4.00.0070.00415.23
7.3.330.0070.00013.36
7.3.320.0000.00613.12
7.3.310.0000.00716.17
7.3.300.0070.00016.17
7.3.290.0000.00716.18
7.3.280.0090.00816.29
7.3.270.0140.00317.40
7.3.260.0110.00916.49
7.3.250.0110.01016.46
7.3.240.0120.00816.46
7.3.230.0060.01216.31
7.3.210.0000.01716.64
7.3.200.0110.01116.23
7.3.190.0130.01216.49
7.3.180.0140.00916.30
7.3.170.0060.01216.66
7.3.160.0090.00916.45
7.2.330.0060.01216.48
7.2.320.0060.01016.51
7.2.310.0120.00416.75
7.2.300.0130.00316.69
7.2.290.0080.02416.42
7.2.60.0040.00717.09
7.2.20.0080.01119.88
7.2.10.0090.01519.78
7.2.00.0070.01319.57
7.1.200.0030.00915.82
7.1.140.0070.01418.62
7.1.130.0040.01218.74
7.1.120.0110.00918.71
7.1.110.0060.01318.18
7.1.100.0060.01117.94
7.1.90.0030.01318.12
7.1.80.0040.01518.20
7.1.70.0000.01517.01
7.1.60.0210.01035.14
7.1.50.0250.01634.71
7.1.40.0220.01334.59
7.1.30.0170.01434.65
7.1.20.0160.01334.50
7.1.10.0060.00916.49
7.1.00.0040.01516.55

preferences:
51.26 ms | 400 KiB | 5 Q