3v4l.org

run code in 300+ PHP versions simultaneously
<?php function my_func(int $n) { var_dump($n); } my_func('6'); // => (int) 6 my_func(3.1415); // => (int) 3 my_func(TRUE); // => (int) 1 my_func([]]); // => (int) 1 my_func(NULL); // => Fatal error: Uncaught TypeError: Argument 1 passed to my_func() must be of the type integer, null given.

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)
7.1.70.0000.01217.00
7.1.60.0210.00934.72
7.1.50.0120.01534.76
7.1.40.0140.01734.29
7.1.30.0160.01334.48
7.1.20.0170.01034.52
7.1.10.0000.01216.40
7.1.00.0060.01316.38
7.0.200.0060.00716.67
7.0.190.0090.00316.43
7.0.180.0030.01015.98
7.0.170.0070.00715.98
7.0.160.0030.00916.00
7.0.150.0040.00816.01
7.0.140.0120.00615.91
7.0.130.0030.01516.58
7.0.120.0020.01616.28
7.0.110.0080.00716.21
7.0.100.0040.01116.30
7.0.90.0060.01216.23
7.0.80.0070.01115.98
7.0.70.0030.01216.20
7.0.60.0060.00615.78
7.0.50.0040.01416.29
7.0.40.0070.01016.27
7.0.30.0100.00316.38
7.0.20.0060.01416.39
7.0.10.0100.00716.39
7.0.00.0030.01416.36

preferences:
139.97 ms | 1394 KiB | 7 Q