3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); 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.40.0070.00718.85
8.3.30.0100.01018.67
8.3.20.0040.00420.34
8.3.10.0080.00023.64
8.3.00.0000.00819.50
8.2.170.0070.00722.96
8.2.160.0100.00320.32
8.2.150.0080.00024.18
8.2.140.0030.00624.66
8.2.130.0040.00420.94
8.2.120.0000.00726.35
8.2.110.0060.00321.13
8.2.100.0040.00818.09
8.2.90.0040.00419.05
8.2.80.0030.00617.97
8.2.70.0040.00417.50
8.2.60.0000.00917.91
8.2.50.0050.00318.10
8.2.40.0000.00720.46
8.2.30.0040.00419.30
8.2.20.0050.00217.99
8.2.10.0080.00017.99
8.2.00.0040.00418.00
8.1.270.0080.00021.91
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0090.00023.88
8.1.230.0060.00619.16
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0090.00017.35
8.1.190.0030.00617.10
8.1.180.0000.00718.10
8.1.170.0040.00418.51
8.1.160.0000.00818.95
8.1.150.0040.00418.78
8.1.140.0040.00419.50
8.1.130.0070.00018.67
8.1.120.0080.00017.39
8.1.110.0040.00417.33
8.1.100.0040.00417.36
8.1.90.0050.00317.24
8.1.80.0040.00417.24
8.1.70.0000.00717.31
8.1.60.0000.00717.42
8.1.50.0040.00417.50
8.1.40.0040.00417.52
8.1.30.0000.00817.63
8.1.20.0070.00417.53
8.1.10.0040.00417.52
8.1.00.0040.00417.33
8.0.300.0070.00018.77
8.0.290.0050.00316.58
8.0.280.0030.00318.34
8.0.270.0030.00317.12
8.0.260.0060.00016.73
8.0.250.0000.00717.02
8.0.240.0030.00516.98
8.0.230.0070.00016.96
8.0.220.0020.00516.88
8.0.210.0000.00716.88
8.0.200.0030.00317.01
8.0.190.0030.00616.88
8.0.180.0080.00016.95
8.0.170.0060.00316.95
8.0.160.0060.00316.94
8.0.150.0040.00416.80
8.0.140.0000.00716.86
8.0.130.0030.00313.33
8.0.120.0050.00216.82
8.0.110.0040.00416.77
8.0.100.0040.00416.75
8.0.90.0040.00416.85
8.0.80.0060.01016.85
8.0.70.0040.00416.95
8.0.60.0070.00016.74
8.0.50.0000.00716.84
8.0.30.0090.01017.11
8.0.20.0120.00817.40
8.0.10.0030.00416.77
8.0.00.0070.01016.43
7.4.330.0000.00515.55
7.4.320.0040.00416.32
7.4.300.0060.00016.43
7.4.290.0030.00316.54
7.4.280.0000.01016.45
7.4.270.0000.00616.34
7.4.260.0040.00416.33
7.4.250.0030.00316.50
7.4.240.0040.00416.39
7.4.230.0000.00716.45
7.4.220.0090.00916.38
7.4.210.0070.00716.46
7.4.200.0000.00716.34
7.4.160.0120.00416.61
7.4.150.0070.01017.40
7.4.140.0090.01417.86
7.4.130.0060.01216.47
7.4.120.0070.01116.37
7.4.110.0120.01216.35
7.4.100.0120.00616.54
7.4.90.0120.00616.38
7.4.80.0030.01419.39
7.4.70.0100.00616.54
7.4.60.0120.00316.36
7.4.50.0070.00416.34
7.4.40.0130.00316.50
7.4.30.0100.00716.45
7.4.00.0070.01014.85
7.3.330.0030.00313.23
7.3.320.0020.00213.25
7.3.310.0030.00316.20
7.3.300.0030.00316.26
7.3.290.0020.01216.28
7.3.280.0070.00916.27
7.3.270.0040.01317.40
7.3.260.0110.00816.31
7.3.250.0100.01116.41
7.3.240.0130.00316.38
7.3.230.0120.00316.56
7.3.210.0150.00316.46
7.3.200.0130.00316.36
7.3.190.0030.01316.57
7.3.180.0090.00616.24
7.3.170.0090.00616.51
7.3.160.0060.00916.32
7.2.330.0140.00316.32
7.2.320.0140.00716.47
7.2.310.0080.00916.64
7.2.300.0140.00316.63
7.2.290.0180.00016.53
7.2.60.0090.00616.95
7.2.00.0080.00619.43
7.1.200.0030.00615.73
7.1.100.0040.00717.75
7.1.70.0030.00916.97
7.1.60.0100.01434.95
7.1.50.0170.00734.75
7.1.40.0180.01334.40
7.1.30.0150.01134.45
7.1.20.0150.01234.52
7.1.10.0050.01016.49
7.1.00.0120.00316.53
7.0.200.0060.00616.81
7.0.190.0000.01116.47
7.0.180.0070.00716.23
7.0.170.0000.01216.07
7.0.160.0040.01116.39
7.0.150.0030.00916.22
7.0.140.0030.00916.00
7.0.130.0080.00816.37
7.0.120.0000.01216.37
7.0.110.0000.01316.16
7.0.100.0000.01316.02
7.0.90.0070.01116.30
7.0.80.0030.00916.37
7.0.70.0080.00416.30
7.0.60.0030.00916.18
7.0.50.0060.00616.29
7.0.40.0070.01116.57
7.0.30.0060.01216.57
7.0.20.0040.00816.25
7.0.10.0040.00816.41
7.0.00.0000.01216.39

preferences:
35.82 ms | 400 KiB | 5 Q