3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); function optional(?string $string = null) { } function not_optional(string $string = null) { } optional(); not_optional();

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.0080.00816.50
8.3.60.0120.00618.43
8.3.50.0070.01417.93
8.3.40.0030.01318.59
8.3.30.0150.00018.55
8.3.20.0070.00021.73
8.3.10.0080.00021.92
8.3.00.0040.00423.61
8.2.180.0140.00418.04
8.2.170.0140.00018.74
8.2.160.0130.00022.96
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00421.07
8.2.120.0000.00726.35
8.2.110.0090.00020.52
8.2.100.0090.00317.78
8.2.90.0050.00317.63
8.2.80.0000.00818.56
8.2.70.0080.00017.68
8.2.60.0080.00017.91
8.2.50.0050.00518.10
8.2.40.0030.00522.32
8.2.30.0040.00419.12
8.2.20.0040.00417.88
8.2.10.0040.00417.88
8.2.00.0060.00318.02
8.1.280.0030.01725.92
8.1.270.0080.00024.01
8.1.260.0030.00526.35
8.1.250.0050.00328.09
8.1.240.0060.00323.91
8.1.230.0090.00319.11
8.1.220.0060.00317.74
8.1.210.0050.00318.77
8.1.200.0080.00017.23
8.1.190.0060.00317.10
8.1.180.0000.00818.10
8.1.170.0000.00818.65
8.1.160.0060.00318.75
8.1.150.0000.00818.85
8.1.140.0040.00417.56
8.1.130.0070.00018.84
8.1.120.0070.00017.37
8.1.110.0030.00617.21
8.1.100.0080.00017.34
8.1.90.0000.00717.20
8.1.80.0030.00617.36
8.1.70.0030.00317.39
8.1.60.0000.01017.47
8.1.50.0080.00017.34
8.1.40.0000.00817.44
8.1.30.0000.00817.43
8.1.20.0040.00417.57
8.1.10.0000.00717.31
8.1.00.0000.00917.19
8.0.300.0000.00719.84
8.0.290.0040.00416.58
8.0.280.0000.00618.23
8.0.270.0050.00317.18
8.0.260.0030.00317.09
8.0.250.0040.00416.87
8.0.240.0000.00716.70
8.0.230.0050.00516.81
8.0.220.0090.00016.64
8.0.210.0000.00716.79
8.0.200.0000.00616.80
8.0.190.0000.00816.77
8.0.180.0030.00316.76
8.0.170.0080.00016.79
8.0.160.0000.00816.80
8.0.150.0040.00316.61
8.0.140.0000.00716.68
8.0.130.0030.00313.16
8.0.120.0000.00816.57
8.0.110.0040.00316.58
8.0.100.0040.00416.86
8.0.90.0030.00416.75
8.0.80.0120.00316.75
8.0.70.0070.00016.74
8.0.60.0040.00416.65
8.0.50.0040.00416.80
8.0.30.0080.00717.04
8.0.20.0120.00717.40
8.0.10.0050.00316.94
8.0.00.0100.01016.80
7.4.330.0040.00015.55
7.4.320.0040.00416.27
7.4.300.0000.00716.42
7.4.290.0030.00316.38
7.4.280.0030.00516.35
7.4.270.0060.00316.48
7.4.260.0030.00616.37
7.4.250.0030.00316.36
7.4.240.0000.00716.39
7.4.230.0070.00016.63
7.4.220.0040.00416.30
7.4.210.0050.00916.56
7.4.200.0030.00316.27
7.4.160.0110.00716.29
7.4.140.0060.01217.86
7.4.130.0110.00816.42
7.4.120.0110.00716.42
7.4.110.0150.00316.35
7.4.100.0130.00316.35
7.4.90.0060.01016.52
7.4.80.0100.01119.39
7.4.70.0040.01116.37
7.4.60.0060.00916.52
7.4.50.0000.01116.37
7.4.40.0000.01516.23
7.4.00.0080.00514.90
7.3.330.0060.00013.02
7.3.320.0000.00713.10
7.3.310.0000.00716.19
7.3.300.0040.00416.11
7.3.290.0030.00316.10
7.3.280.0080.00816.26
7.3.260.0130.00516.36
7.3.240.0080.01116.42
7.3.230.0100.00616.50
7.3.210.0030.01416.24
7.3.200.0130.00316.23
7.3.190.0060.00916.20
7.3.180.0030.01216.33
7.3.170.0030.01316.37
7.3.160.0110.00616.35
7.2.330.0030.01316.61
7.2.320.0070.01016.48
7.2.310.0110.00616.51
7.2.300.0110.00616.18
7.2.290.0100.01016.66
7.2.60.0200.00416.76
7.2.40.2540.01117.91
7.2.30.2490.00918.04
7.2.20.1640.00917.54
7.2.10.2220.01317.73
7.2.00.1980.01117.73
7.1.200.0040.00815.61
7.1.160.2090.00916.83
7.1.150.2190.01416.41
7.1.140.1700.01116.50
7.1.130.2090.01116.89
7.1.120.1860.01016.48
7.1.110.3060.01316.20
7.1.100.2640.00816.08
7.1.90.1770.01015.93
7.1.80.1540.01115.71
7.1.70.1990.01015.14
7.1.60.1930.01333.13
7.1.50.2090.01232.59
7.1.40.2180.01232.50
7.1.30.2500.01632.40
7.1.20.2240.01332.42
7.1.10.2140.00814.65
7.1.00.1400.01014.75

preferences:
59.43 ms | 400 KiB | 5 Q