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());

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.0110.01116.63
8.3.50.0110.01121.11
8.3.40.0060.00918.57
8.3.30.0000.01518.71
8.3.20.0130.00620.13
8.3.10.0050.00221.90
8.3.00.0050.00319.68
8.2.180.0070.01018.12
8.2.170.0070.01122.96
8.2.160.0100.00320.39
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0030.00526.16
8.2.120.0030.00617.50
8.2.110.0060.00319.46
8.2.100.0090.00317.56
8.2.90.0080.00018.98
8.2.80.0060.00317.97
8.2.70.0030.00617.25
8.2.60.0040.00417.80
8.2.50.0060.00318.07
8.2.40.0060.00321.07
8.2.30.0040.00417.93
8.2.20.0000.00817.51
8.2.10.0060.00317.92
8.2.00.0040.00417.98
8.1.280.0030.01425.92
8.1.270.0040.00420.28
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0030.00623.96
8.1.230.0050.00617.42
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0030.00717.22
8.1.190.0040.00417.13
8.1.180.0030.00518.10
8.1.170.0000.00718.53
8.1.160.0030.00521.90
8.1.150.0000.00818.76
8.1.140.0040.00417.23
8.1.130.0000.00717.53
8.1.120.0040.00417.25
8.1.110.0070.00017.29
8.1.100.0040.00417.36
8.1.90.0000.00717.20
8.1.80.0040.00417.32
8.1.70.0000.00717.21
8.1.60.0040.00417.59
8.1.50.0040.00417.47
8.1.40.0140.00017.41
8.1.30.0000.00817.42
8.1.20.0000.00817.55
8.1.10.0040.00417.31
8.1.00.0000.00817.36
8.0.300.0070.00018.77
8.0.290.0000.00716.63
8.0.280.0000.00718.19
8.0.270.0030.00317.13
8.0.260.0070.00317.20
8.0.250.0040.00416.80
8.0.240.0040.00716.84
8.0.230.0030.00316.64
8.0.220.0000.00716.72
8.0.210.0040.00416.66
8.0.200.0000.00716.82
8.0.190.0050.00216.87
8.0.180.0060.00616.80
8.0.170.0040.00416.58
8.0.160.0040.00416.76
8.0.150.0030.00516.73
8.0.140.0000.00716.64
8.0.130.0000.00813.15
8.0.120.0030.00516.67
8.0.110.0000.00716.76
8.0.100.0070.00016.60
8.0.90.0070.00016.83
8.0.80.0090.01316.71
8.0.70.0040.00416.84
8.0.60.0050.00316.66
8.0.50.0040.00416.71
8.0.30.0100.00516.96
8.0.20.0100.01217.40
8.0.10.0070.00016.69
8.0.00.0080.00916.72
7.4.330.0000.00615.08
7.4.320.0030.00316.36
7.4.300.0000.00716.48
7.4.290.0030.00316.59
7.4.280.0040.00416.48
7.4.270.0030.00316.52
7.4.260.0030.00316.44
7.4.250.0030.00616.42
7.4.240.0070.00016.56
7.4.230.0030.00316.34
7.4.220.0100.00716.65
7.4.210.0060.01116.57
7.4.200.0030.00316.52
7.4.160.0150.00716.36
7.4.150.0250.00017.40
7.4.140.0090.01217.86
7.4.130.0120.00916.55
7.4.120.0100.01016.53
7.4.110.0100.00716.25
7.4.100.0070.01016.32
7.4.90.0100.01316.38
7.4.80.0080.00819.39
7.4.70.0090.00916.18
7.4.60.0130.00316.43
7.4.50.0060.00316.53
7.4.40.0000.01716.45
7.4.30.0060.01316.41
7.4.00.0040.00814.96
7.3.330.0000.00813.32
7.3.320.0060.00013.27
7.3.310.0030.00316.20
7.3.300.0070.00016.30
7.3.290.0030.00316.32
7.3.280.0080.01216.28
7.3.270.0120.00617.40
7.3.260.0100.00716.36
7.3.250.0130.00816.42
7.3.240.0070.01416.26
7.3.230.0100.01316.52
7.3.210.0130.00316.53
7.3.200.0030.01319.39
7.3.190.0060.01016.38
7.3.180.0060.01216.53
7.3.170.0140.00716.31
7.3.160.0060.01516.57
7.3.10.0100.00316.72
7.3.00.0070.00716.54
7.2.330.0140.00316.17
7.2.320.0070.01416.43
7.2.310.0090.01216.41
7.2.300.0110.01116.32
7.2.290.0070.01416.30
7.2.130.0000.01516.81
7.2.120.0030.00716.55
7.2.110.0070.00816.50
7.2.100.0000.01216.87
7.2.90.0000.01616.82
7.2.80.0130.00316.60
7.2.70.0000.01116.73
7.2.60.0030.01216.72
7.2.50.0100.00316.54
7.2.40.0030.01016.53
7.2.30.0060.01016.63
7.2.20.0000.01716.84
7.2.10.0060.00916.58
7.2.00.0030.00918.01
7.1.250.0070.00415.69
7.1.200.0080.00415.69
7.1.100.0060.01217.79
7.1.70.0040.00417.03
7.1.60.0140.01120.03
7.1.50.0070.01416.82
7.1.00.0070.07322.48
7.0.200.0080.00316.71
7.0.60.0000.04319.89
7.0.50.0100.04717.79
7.0.40.0030.06720.05
7.0.30.0230.04020.11
7.0.20.0200.07320.25
7.0.10.0100.08020.15
7.0.00.0070.05320.30
5.6.280.0100.06020.90
5.6.210.0100.07020.67
5.6.200.0000.04718.17
5.6.190.0070.06720.37
5.6.180.4400.04320.61
5.6.170.0230.08020.50
5.6.160.0070.05720.55
5.6.150.0000.06018.19
5.6.140.0100.07718.18
5.6.130.0030.05718.18
5.6.120.0070.08020.90
5.6.110.0100.07321.05
5.6.100.0030.05720.98
5.6.90.0100.08020.98
5.6.80.0070.05320.44
5.6.70.4170.04320.52
5.5.350.0200.05720.40
5.5.340.0000.04318.09
5.5.330.0100.06020.43
5.5.320.0370.08320.24
5.5.310.0200.04320.51
5.5.300.0070.04317.95
5.5.290.0070.04317.94
5.5.280.0070.05020.73
5.5.270.0130.08020.76
5.5.260.0030.08320.68
5.5.250.0130.07720.80
5.5.240.0300.05320.29
5.4.450.0130.07319.70
5.4.440.0130.07319.58
5.4.430.0130.05319.64
5.4.420.0130.05019.61
5.4.410.0170.04719.25
5.4.400.0270.03718.99
5.4.390.0170.05019.26
5.4.380.0130.05019.15
5.4.370.0270.04319.29
5.4.360.0170.05319.26
5.4.350.0230.06319.28
5.4.340.0070.06019.28
5.4.320.0230.04319.29
5.4.310.0130.05019.26
5.4.300.0200.07319.28
5.4.290.0100.05318.98
5.4.280.0170.05019.15
5.4.270.0130.05019.14
5.4.260.0100.05319.14
5.4.250.0100.05719.12
5.4.240.0170.07319.14
5.4.230.0100.05319.28
5.4.220.0130.05319.25
5.4.210.0230.06718.95
5.4.200.0100.05316.73
5.4.190.0200.04319.02
5.4.180.0230.06019.02
5.4.170.0100.05719.02
5.4.160.0170.05019.00
5.4.150.0230.04319.17
5.4.140.0130.07716.54
5.4.130.0100.05016.57
5.4.120.0030.05716.43
5.4.110.0130.06716.72
5.4.100.0070.05716.31
5.4.90.0100.05316.32
5.4.80.0170.07016.31
5.4.70.0030.06016.42
5.4.60.0130.04716.48
5.4.50.0100.05016.53
5.4.40.0200.07016.42
5.4.30.0070.05316.33
5.4.20.0170.07316.49
5.4.10.0100.05016.27
5.4.00.0070.05315.86

preferences:
63.82 ms | 401 KiB | 5 Q