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([]); // => Fatal error: Uncaught TypeError: Argument 1 passed to my_func() must be of the type integer, array given // my_func(new \stdClass()); // => ... object given // my_func(NULL); // => ... 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)
8.3.60.0070.01116.74
8.3.50.0070.00716.24
8.3.40.0070.00718.54
8.3.30.0110.00418.67
8.3.20.0000.00820.16
8.3.10.0040.00423.65
8.3.00.0050.00319.26
8.2.180.0130.00718.28
8.2.170.0110.00722.96
8.2.160.0140.00320.42
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00421.12
8.2.120.0070.00026.35
8.2.110.0030.00619.38
8.2.100.0110.00017.91
8.2.90.0080.00019.04
8.2.80.0000.00817.97
8.2.70.0040.00417.38
8.2.60.0080.00017.80
8.2.50.0030.00518.10
8.2.40.0040.00420.45
8.2.30.0050.00519.13
8.2.20.0040.00417.93
8.2.10.0040.00417.78
8.2.00.0000.00717.84
8.1.280.0090.01225.92
8.1.270.0060.00322.19
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00719.30
8.1.230.0090.00318.93
8.1.220.0000.00717.74
8.1.210.0060.00318.77
8.1.200.0030.00617.22
8.1.190.0000.00917.23
8.1.180.0060.00318.10
8.1.170.0040.00418.37
8.1.160.0040.00418.85
8.1.150.0030.00518.74
8.1.140.0030.00519.46
8.1.130.0030.00318.67
8.1.120.0000.00717.33
8.1.110.0000.00717.22
8.1.100.0060.00317.38
8.1.90.0040.00417.33
8.1.80.0030.00417.38
8.1.70.0030.00317.29
8.1.60.0000.00817.55
8.1.50.0040.00417.41
8.1.40.0040.00417.37
8.1.30.0040.00417.59
8.1.20.0070.00417.60
8.1.10.0040.00417.54
8.1.00.0040.00417.48
8.0.300.0070.00018.77
8.0.290.0040.00416.75
8.0.280.0000.00718.24
8.0.270.0030.00317.25
8.0.260.0000.00716.81
8.0.250.0030.00316.83
8.0.240.0080.00016.94
8.0.230.0030.00316.95
8.0.220.0030.00316.91
8.0.210.0080.00016.91
8.0.200.0080.00016.98
8.0.190.0030.00517.00
8.0.180.0000.00716.91
8.0.170.0000.00816.77
8.0.160.0000.00716.94
8.0.150.0030.00316.91
8.0.140.0040.00416.82
8.0.130.0030.00313.30
8.0.120.0000.00916.74
8.0.110.0040.00416.83
8.0.100.0040.00416.89
8.0.90.0050.00316.90
8.0.80.0100.00716.90
8.0.70.0050.00216.77
8.0.60.0050.00216.93
8.0.50.0040.00416.76
8.0.30.0110.00717.10
8.0.20.0110.00717.40
8.0.10.0050.00216.78
8.0.00.0100.01016.65
7.4.330.0020.00215.55
7.4.320.0060.00016.47
7.4.300.0000.00616.53
7.4.290.0000.00716.50
7.4.280.0110.00016.40
7.4.270.0060.00016.29
7.4.260.0000.00716.48
7.4.250.0060.00316.46
7.4.240.0000.00716.45
7.4.230.0030.00316.59
7.4.220.0140.00416.46
7.4.210.0030.01116.51
7.4.200.0000.00716.44
7.4.160.0110.00816.29
7.4.150.0150.00817.40
7.4.140.0130.00817.86
7.4.130.0070.01816.52
7.4.120.0100.00816.45
7.4.110.0120.00616.52
7.4.100.0110.01116.25
7.4.90.0120.00616.34
7.4.80.0160.00919.39
7.4.70.0090.00916.52
7.4.60.0060.00916.34
7.4.50.0000.01116.49
7.4.40.0100.00716.61
7.4.30.0130.00316.39
7.4.00.0120.00614.61
7.3.330.0000.00513.15
7.3.320.0000.00513.09
7.3.310.0050.00216.13
7.3.300.0020.00516.25
7.3.290.0120.00316.24
7.3.280.0090.00716.23
7.3.270.0000.01717.40
7.3.260.0120.00816.37
7.3.250.0090.00916.40
7.3.240.0070.01216.36
7.3.230.0100.00716.33
7.3.210.0100.00616.51
7.3.200.0070.01016.20
7.3.190.0120.00916.22
7.3.180.0070.01316.34
7.3.170.0080.00816.64
7.3.160.0090.00616.44
7.2.330.0130.00616.58
7.2.320.0120.00916.61
7.2.310.0060.01216.55
7.2.300.0120.00616.54
7.2.290.0000.01716.61
7.2.60.0000.01116.86
7.2.00.0070.01419.19
7.1.200.0030.00615.63
7.1.100.0030.00918.23
7.1.70.0030.00917.09
7.1.60.0230.01034.75
7.1.50.0180.00734.58
7.1.40.0160.01634.42
7.1.30.0230.01034.65
7.1.20.0170.01034.67
7.1.10.0030.00916.59
7.1.00.0000.01316.62
7.0.200.0040.00816.48
7.0.190.0040.00816.40
7.0.180.0110.00316.13
7.0.170.0080.00816.25
7.0.160.0110.00416.16
7.0.150.0000.01216.23
7.0.140.0080.00516.31
7.0.130.0000.01216.47
7.0.120.0040.00816.65
7.0.110.0040.00816.26
7.0.100.0030.00916.33
7.0.90.0100.00316.54
7.0.80.0040.00816.30
7.0.70.0050.00716.23
7.0.60.0000.01316.29
7.0.50.0050.00816.41
7.0.40.0060.00616.23
7.0.30.0040.00816.52
7.0.20.0090.00316.45
7.0.10.0060.00616.30
7.0.00.0060.00616.61

preferences:
44.74 ms | 401 KiB | 5 Q