3v4l.org

run code in 300+ PHP versions simultaneously
<?php function NC($x){ return ($x ?? "Foo"); } NC(NULL); // I know this will return "Foo". /* But I have no clue about what these will return. */ NC(0); NC(-1); NC(""); NC(array()); NC("banana");

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.0130.01016.63
8.3.60.0100.01016.50
8.3.50.0210.00621.07
8.3.40.0040.01118.85
8.3.30.0070.00718.60
8.3.20.0110.00420.19
8.3.10.0040.00421.85
8.3.00.0080.00019.31
8.2.180.0070.01018.29
8.2.170.0070.00722.96
8.2.160.0070.00720.44
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0000.00917.38
8.2.110.0090.00019.27
8.2.100.0090.00317.66
8.2.90.0030.00619.13
8.2.80.0000.00917.97
8.2.70.0040.00417.50
8.2.60.0050.00317.80
8.2.50.0000.00918.07
8.2.40.0040.00421.09
8.2.30.0000.00718.06
8.2.20.0040.00417.61
8.2.10.0000.00917.97
8.2.00.0040.00417.80
8.1.280.0060.00925.92
8.1.270.0030.00620.24
8.1.260.0030.00626.35
8.1.250.0040.00428.09
8.1.240.0060.00323.93
8.1.230.0070.00417.45
8.1.220.0000.00817.74
8.1.210.0030.00618.77
8.1.200.0040.00717.23
8.1.190.0040.00417.23
8.1.180.0070.00018.10
8.1.170.0000.00718.67
8.1.160.0000.00721.99
8.1.150.0060.00318.68
8.1.140.0040.00417.43
8.1.130.0000.00717.68
8.1.120.0000.00717.40
8.1.110.0040.00417.32
8.1.100.0070.00017.31
8.1.90.0070.00017.32
8.1.80.0040.00417.32
8.1.70.0030.00317.33
8.1.60.0030.00617.40
8.1.50.0070.00317.34
8.1.40.0030.00717.31
8.1.30.0060.00317.41
8.1.20.0000.00717.58
8.1.10.0040.00417.44
8.1.00.0000.00817.25
8.0.300.0000.00718.77
8.0.290.0040.00416.58
8.0.280.0040.00418.33
8.0.270.0050.00317.03
8.0.260.0100.00017.04
8.0.250.0050.00216.81
8.0.240.0030.00816.69
8.0.230.0000.00716.81
8.0.220.0040.00216.82
8.0.210.0000.00816.77
8.0.200.0000.00816.71
8.0.190.0000.00716.80
8.0.180.0040.00816.82
8.0.170.0080.00016.57
8.0.160.0000.00716.74
8.0.150.0070.00016.79
8.0.140.0040.00416.73
8.0.130.0000.00513.18
8.0.120.0080.00016.70
8.0.110.0040.00416.70
8.0.100.0000.00816.70
8.0.90.0030.00316.82
8.0.80.0090.00616.79
8.0.70.0080.00016.80
8.0.60.0040.00416.63
8.0.50.0040.00416.61
8.0.30.0120.00317.11
8.0.20.0120.00917.40
8.0.10.0030.00316.68
8.0.00.0090.00916.63
7.4.330.0000.00515.08
7.4.320.0030.00316.50
7.4.300.0030.00316.54
7.4.290.0030.00316.48
7.4.280.0040.00416.48
7.4.270.0030.00316.52
7.4.260.0070.00016.51
7.4.250.0040.00416.39
7.4.240.0020.00516.47
7.4.230.0040.00416.52
7.4.220.0060.01916.54
7.4.210.0080.00916.49
7.4.200.0000.00716.36
7.4.160.0110.00516.42
7.4.150.0110.01117.40
7.4.140.0120.00917.86
7.4.130.0070.01216.43
7.4.120.0040.01216.43
7.4.110.0110.00716.51
7.4.100.0140.00316.37
7.4.90.0100.00716.55
7.4.80.0070.01119.39
7.4.70.0130.00416.55
7.4.60.0100.00616.46
7.4.50.0040.00816.14
7.4.40.0130.01016.39
7.4.30.0140.00316.43
7.4.00.0040.01515.11
7.3.330.0040.00413.13
7.3.320.0000.00513.27
7.3.310.0000.00716.20
7.3.300.0000.00616.32
7.3.290.0050.00216.31
7.3.280.0070.01016.28
7.3.270.0100.00717.40
7.3.260.0090.00916.30
7.3.250.0070.01016.29
7.3.240.0140.00716.36
7.3.230.0090.01216.39
7.3.210.0120.00616.37
7.3.200.0030.01319.39
7.3.190.0030.01516.24
7.3.180.0060.01216.46
7.3.170.0130.01216.27
7.3.160.0100.00716.63
7.3.120.0090.00614.95
7.3.110.0100.00714.61
7.3.100.0030.01214.92
7.3.90.0090.00914.98
7.3.80.0100.00314.75
7.3.70.0040.01114.71
7.3.60.0070.00714.82
7.3.50.0000.01614.77
7.3.40.0080.00614.63
7.3.30.0040.00414.50
7.3.20.0100.00316.45
7.3.10.0100.00016.54
7.3.00.0060.00316.56
7.2.330.0000.01716.27
7.2.320.0080.00816.53
7.2.310.0100.01016.25
7.2.300.0080.01216.17
7.2.290.0060.01516.50
7.2.240.0030.01514.66
7.2.230.0000.01714.77
7.2.220.0130.00614.60
7.2.210.0000.01714.73
7.2.200.0060.00614.81
7.2.190.0130.00014.40
7.2.180.0040.01414.79
7.2.170.0090.00314.57
7.2.160.0060.00614.33
7.2.150.0090.00916.77
7.2.140.0090.00616.73
7.2.130.0000.01316.77
7.2.120.0040.01116.61
7.2.110.0060.00916.76
7.2.100.0130.00616.45
7.2.90.0080.00816.55
7.2.80.0080.00916.45
7.2.70.0070.01016.72
7.2.60.0070.00516.58
7.2.50.0050.00516.88
7.2.40.0070.01016.73
7.2.30.0030.01316.80
7.2.20.0060.01216.84
7.2.10.0070.01016.82
7.2.00.0110.00317.95
7.1.330.0070.00515.77
7.1.320.0080.00815.47
7.1.310.0030.01015.42
7.1.300.0000.01115.52
7.1.290.0070.00715.57
7.1.280.0030.01015.72
7.1.270.0130.00015.43
7.1.260.0060.00615.64
7.1.250.0090.00615.41
7.1.200.0110.00715.77
7.1.100.0070.00717.68
7.1.70.0070.01317.13
7.1.60.0070.01820.03
7.1.50.0100.01416.88
7.1.00.0170.06322.45
7.0.200.0040.00816.32
7.0.60.0230.06720.03
7.0.50.0100.04317.87
7.0.40.0170.08320.20
7.0.30.0500.07020.23
7.0.20.0230.04320.02
7.0.10.0000.04720.09
7.0.00.0130.08020.28
5.6.280.0130.06321.11
5.6.210.0000.09320.47
5.6.200.0000.07718.20
5.6.190.0000.04720.52
5.6.180.0230.08320.34
5.6.170.0170.04020.71
5.6.160.0070.05320.54
5.6.150.0030.05718.21
5.6.140.0070.04318.18
5.6.130.0030.04018.28
5.6.120.0030.04720.95
5.6.110.0030.08720.98
5.6.100.0170.07021.01
5.6.90.0030.06021.11
5.6.80.0170.04020.37
5.5.350.0000.08720.50
5.5.340.0170.07318.09
5.5.330.0030.04020.42
5.5.320.0100.06720.25
5.5.310.0300.07320.23
5.5.300.0030.08317.98
5.5.290.0030.07317.95
5.5.280.0130.08020.88
5.5.270.0130.08020.95
5.5.260.0030.04320.88
5.5.250.0070.08020.69
5.5.240.0270.07020.27
5.4.450.0200.05319.16
5.4.440.0130.07719.30
5.4.430.0530.07019.16
5.4.420.0170.05319.70
5.4.410.0200.04719.34
5.4.400.0030.07019.29
5.4.390.0270.05719.29
5.4.380.0200.05019.29
5.4.370.0270.06019.32
5.4.360.0100.07719.12
5.4.350.0200.05019.30
5.4.340.0130.05719.15
5.4.320.0200.05719.28
5.4.310.0230.06719.14
5.4.300.0230.06319.26
5.4.290.0200.05019.12
5.4.280.0130.05719.06
5.4.270.0200.05318.98
5.4.260.0270.05718.88
5.4.250.0230.05719.05
5.4.240.0200.05319.25
5.4.230.0100.08019.16
5.4.220.0170.06319.14
5.4.210.0200.07319.23
5.4.200.0130.06716.71
5.4.190.0130.05319.08
5.4.180.0070.06018.88
5.4.170.0170.05719.34
5.4.160.0230.05018.95
5.4.150.0230.04718.88
5.4.140.0270.04316.36
5.4.130.0130.05016.35
5.4.120.0130.05016.50
5.4.110.0300.07716.40
5.4.100.0230.05316.51
5.4.90.0100.05316.50
5.4.80.0130.06716.52
5.4.70.0130.07716.41
5.4.60.0170.07016.48
5.4.50.0130.05716.69
5.4.40.0230.04316.38
5.4.30.0030.07716.53
5.4.20.0130.06316.39
5.4.10.0230.05016.27
5.4.00.0200.04316.02

preferences:
61.98 ms | 401 KiB | 5 Q