3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tests = array( "42", 1337, 0x539, 02471, 0b10100111001, 1337e0, "not numeric", array(), 9.1, null ); foreach ($tests as $element) { if (\is_numeric($element)) { $int = (int) $element; echo var_dump($int), PHP_EOL; $float = 10 * $element; echo var_dump($float), PHP_EOL; } else { echo var_export($element, true) . " is NOT numeric", PHP_EOL; } }

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.70.0120.00618.24
8.3.60.0090.00618.30
8.3.50.0150.00618.17
8.3.40.0140.00718.75
8.3.30.0140.00318.55
8.3.20.0000.00819.20
8.3.10.0040.00421.49
8.3.00.0030.00620.64
8.2.180.0100.01318.40
8.2.170.0110.00722.96
8.2.160.0110.00320.81
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0040.00419.59
8.2.120.0000.00826.35
8.2.110.0100.00020.79
8.2.100.0070.00317.72
8.2.90.0030.00617.75
8.2.80.0080.00019.36
8.2.70.0040.00417.93
8.2.60.0080.00018.22
8.2.50.0040.00418.10
8.2.40.0050.00319.29
8.2.30.0030.00519.24
8.2.20.0000.00818.05
8.2.10.0040.00418.05
8.2.00.0030.00617.76
8.1.280.0120.00325.92
8.1.270.0060.00318.88
8.1.260.0080.00026.35
8.1.250.0000.00728.09
8.1.240.0100.00022.42
8.1.230.0040.00722.13
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0030.00617.23
8.1.190.0000.00917.10
8.1.180.0030.00618.10
8.1.170.0040.00418.30
8.1.160.0070.00018.82
8.1.150.0030.00518.88
8.1.140.0040.00422.14
8.1.130.0060.00620.13
8.1.120.0050.00217.34
8.1.110.0040.00417.34
8.1.100.0050.00317.46
8.1.90.0000.00717.35
8.1.80.0000.00817.33
8.1.70.0040.00417.50
8.1.60.0000.00817.56
8.1.50.0030.00717.23
8.1.40.0000.00817.40
8.1.30.0050.00317.64
8.1.20.0030.00617.55
8.1.10.0050.00317.44
8.1.00.0000.00817.32
8.0.300.0070.00018.77
8.0.290.0060.00316.63
8.0.280.0000.00718.30
8.0.270.0070.00017.24
8.0.260.0040.00418.44
8.0.250.0030.00716.89
8.0.240.0070.00016.95
8.0.230.0040.00416.82
8.0.220.0000.00716.88
8.0.210.0050.00216.89
8.0.200.0000.00716.82
8.0.190.0000.00816.96
8.0.180.0030.00516.80
8.0.170.0050.00316.96
8.0.160.0000.00716.83
8.0.150.0040.00816.73
8.0.140.0040.00416.90
8.0.130.0030.00313.32
8.0.120.0050.00316.88
8.0.110.0050.00516.86
8.0.100.0040.00416.90
8.0.90.0000.00716.75
8.0.80.0110.00616.90
8.0.70.0000.00716.92
8.0.60.0040.00416.84
8.0.50.0000.00816.94
8.0.30.0100.00717.15
8.0.20.0120.00917.40
8.0.10.0000.00716.80
8.0.00.0090.01016.92
7.4.330.0050.00015.55
7.4.320.0000.00616.49
7.4.300.0000.00716.50
7.4.290.0000.00716.50
7.4.280.0060.00316.44
7.4.270.0030.00616.58
7.4.260.0000.01116.52
7.4.250.0040.00416.50
7.4.240.0050.00216.54
7.4.230.0000.00816.39
7.4.220.0050.00216.60
7.4.210.0100.00816.45
7.4.200.0040.00416.67
7.4.160.0090.00816.45
7.4.140.0110.00717.86
7.4.130.0140.00716.52
7.4.120.0110.00616.52
7.4.110.0090.00916.57
7.4.100.0110.00716.54
7.4.90.0070.01116.42
7.4.80.0110.01419.39
7.4.70.0140.00616.56
7.4.60.0040.01116.39
7.4.50.0090.00516.44
7.4.40.0040.01216.66
7.3.330.0050.00012.98
7.3.320.0000.00513.12
7.3.310.0040.00416.40
7.3.300.0020.00516.27
7.3.290.0000.00716.23
7.3.280.0070.00916.26
7.3.260.0080.01216.34
7.3.240.0110.00716.40
7.3.230.0090.00916.22
7.3.210.0180.01516.47
7.3.200.0070.01016.50
7.3.190.0120.00916.46
7.3.180.0060.01216.22
7.3.170.0100.00716.42
7.3.160.0030.01416.20
7.2.330.0060.01216.59
7.2.320.0130.01016.34
7.2.310.0090.01216.41
7.2.300.0190.00616.75
7.2.290.0110.00616.43

preferences:
45.21 ms | 401 KiB | 5 Q