3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types = 1); function select1(int $offset = 0) { var_dump($offset); } function select2(?int $offset = 0) { var_dump($offset); } function select3(int $offset = null) { var_dump($offset); } function select4(?int $offset = null) { // same as select3 var_dump($offset); } select1(); select1(0); // select1(null); // <------ fails select2(); select2(0); select2(null); select3(); select3(0); select3(null); select4(); select4(0); select4(null);

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.130.0000.00818.51
8.3.120.0000.00718.84
8.3.110.0060.00316.41
8.3.100.0110.00416.61
8.3.90.0070.00018.30
8.3.80.0060.00318.43
8.3.70.0140.00316.50
8.3.60.0110.00718.31
8.3.50.0130.00524.49
8.3.40.0000.01520.13
8.3.30.0100.00718.59
8.3.20.0000.00821.86
8.3.10.0070.00020.30
8.3.00.0000.00820.63
8.2.250.0000.00816.54
8.2.240.0080.00817.07
8.2.230.0060.00320.94
8.2.220.0100.00024.06
8.2.210.0060.00326.77
8.2.200.0080.00018.41
8.2.190.0070.01016.58
8.2.180.0000.01418.26
8.2.170.0100.01022.96
8.2.160.0070.00719.16
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0080.00026.16
8.2.120.0040.00426.16
8.2.110.0040.00422.16
8.2.100.0060.00619.45
8.2.90.0090.00017.50
8.2.80.0040.00418.53
8.2.70.0040.00417.50
8.2.60.0040.00417.38
8.2.50.0030.00518.05
8.2.40.0030.00521.17
8.2.30.0030.00517.80
8.2.20.0050.00217.80
8.2.10.0040.00419.10
8.2.00.0040.00419.11
8.1.300.0030.00716.11
8.1.290.0060.00318.88
8.1.280.0110.00725.92
8.1.270.0050.00322.19
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0030.00623.96
8.1.230.0070.00419.21
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0030.00617.40
8.1.190.0030.00617.10
8.1.180.0000.00818.10
8.1.170.0000.00717.62
8.1.160.0040.00418.66
8.1.150.0000.00818.63
8.1.140.0070.00018.75
8.1.130.0070.00020.02
8.1.120.0040.00417.29
8.1.110.0000.00817.38
8.1.100.0070.00017.22
8.1.90.0030.00517.21
8.1.80.0040.00417.29
8.1.70.0000.00817.30
8.1.60.0040.00417.55
8.1.50.0040.00417.34
8.1.40.0000.00817.47
8.1.30.0040.00417.59
8.1.20.0040.00417.59
8.1.10.0000.00717.37
8.1.00.0040.00417.23
8.0.300.0040.00418.77
8.0.290.0070.00016.58
8.0.280.0000.00718.22
8.0.270.0040.00417.75
8.0.260.0000.00721.78
8.0.250.0000.00616.88
8.0.240.0000.00716.71
8.0.230.0040.00416.75
8.0.220.0040.00416.72
8.0.210.0000.00716.81
8.0.200.0030.00316.73
8.0.190.0040.00416.68
8.0.180.0000.00716.80
8.0.170.0030.00616.73
8.0.160.0050.00316.71
8.0.150.0000.00716.77
8.0.140.0040.00416.71
8.0.130.0000.00513.22
8.0.120.0000.00716.75
8.0.110.0070.00016.64
8.0.100.0050.00316.54
8.0.90.0060.00316.62
8.0.80.0090.00916.81
8.0.70.0000.00816.58
8.0.60.0040.00416.70
8.0.50.0040.00416.70
8.0.30.0120.00616.99
8.0.20.0110.00916.82
8.0.10.0050.00316.87
8.0.00.0100.00716.50
7.4.330.0000.00415.55
7.4.320.0060.00016.47
7.4.300.0030.00316.33
7.4.290.0040.00416.47
7.4.280.0060.00216.44
7.4.270.0030.00316.41
7.4.260.0060.00013.25
7.4.250.0050.00316.39
7.4.240.0020.00516.52
7.4.230.0070.00016.57
7.4.220.0000.00716.55
7.4.210.0040.01516.53
7.4.200.0040.00416.55
7.4.130.0080.01316.36
7.4.120.0100.00716.41
7.4.110.0070.01016.43
7.4.100.0170.00716.49
7.4.90.0070.01016.37
7.4.80.0070.01019.39
7.4.70.0080.00816.41
7.4.60.0130.01016.29
7.4.50.0080.00316.16
7.4.40.0070.01016.22
7.4.30.0120.00516.53
7.4.20.0070.01016.48
7.4.10.0140.00716.50
7.4.00.0090.00916.43
7.3.330.0000.00616.25
7.3.320.0000.00613.17
7.3.310.0000.00716.21
7.3.300.0000.00716.24
7.3.290.0040.01216.23
7.3.280.0110.00316.20
7.3.260.0060.01216.25
7.3.230.0110.00616.48
7.3.210.0100.01016.43
7.3.200.0070.01016.19
7.3.190.0070.01016.17
7.3.180.0090.01316.25
7.3.170.0050.01116.29
7.3.160.0120.00616.35
7.3.150.0110.00516.27
7.3.140.0070.01116.54
7.3.130.0130.00316.57
7.3.120.0100.00616.52
7.3.110.0100.00716.45
7.3.100.0030.01316.31
7.3.90.0050.01016.52
7.3.80.0080.00916.22
7.3.70.0100.00616.21
7.3.60.0040.01716.38
7.3.50.0150.00316.23
7.3.40.0030.01316.21
7.3.30.0000.01716.28
7.3.20.0110.00816.37
7.3.10.0110.01016.40
7.3.00.0140.00316.35
7.2.330.0110.01116.58
7.2.320.0120.01016.47
7.2.310.0130.00416.64
7.2.300.0100.01316.62
7.2.290.0060.01116.09
7.2.280.0070.01416.19
7.2.270.0120.01216.10
7.2.260.0140.00316.19
7.2.250.0030.01316.53
7.2.240.0080.00816.59
7.2.230.0080.01116.57
7.2.220.0100.00716.23
7.2.210.0030.01516.54
7.2.200.0090.00916.35
7.2.190.0110.00716.34
7.2.180.0060.01316.32
7.2.170.0130.00316.38
7.2.160.0110.00716.43
7.2.150.0090.00916.43
7.2.140.0110.01216.32
7.2.130.0110.00616.36
7.2.120.0160.00616.42
7.2.110.0090.00916.34
7.2.100.0030.01516.34
7.2.90.0040.01616.51
7.2.80.0070.01016.58
7.2.70.0120.00816.59
7.2.60.0100.00716.38
7.2.50.0130.00516.46
7.2.40.0100.00716.43
7.2.30.0140.00416.45
7.2.20.0100.00716.66
7.2.10.0140.00416.26
7.2.00.0070.01016.48

preferences:
26.08 ms | 403 KiB | 5 Q