3v4l.org

run code in 300+ PHP versions simultaneously
<?php function NC($x){ $y = array(); $y['test'] = $x; $returnThis = $y['test'] ?? "Foo"; return $returnThis; } var_dump(NC(NULL)); // I know this will return "Foo". /* But I have no clue about what these will return. */ var_dump(NC(0)); var_dump(NC(-1)); var_dump(NC("")); var_dump(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.40.0110.00418.84
8.3.30.0180.00018.71
8.3.20.0070.00020.38
8.3.10.0040.00421.76
8.3.00.0000.00819.68
8.2.170.0100.00722.96
8.2.160.0100.00719.29
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0080.00017.63
8.2.110.0040.00422.25
8.2.100.0120.00017.63
8.2.90.0040.00419.11
8.2.80.0050.00317.97
8.2.70.0070.00317.63
8.2.60.0030.00617.80
8.2.50.0040.00418.07
8.2.40.0040.00421.24
8.2.30.0050.00217.98
8.2.20.0040.00417.75
8.2.10.0040.00417.98
8.2.00.0040.00417.94
8.1.270.0030.00520.40
8.1.260.0000.00826.35
8.1.250.0050.00328.09
8.1.240.0030.00622.53
8.1.230.0110.00017.42
8.1.220.0030.00717.74
8.1.210.0040.00418.77
8.1.200.0100.00017.34
8.1.190.0040.00417.22
8.1.180.0000.00718.10
8.1.170.0030.00518.65
8.1.160.0000.00722.02
8.1.150.0040.00418.75
8.1.140.0030.00517.36
8.1.130.0030.00317.63
8.1.120.0000.00717.30
8.1.110.0000.00717.42
8.1.100.0000.00817.33
8.1.90.0030.00317.29
8.1.80.0030.00617.34
8.1.70.0000.00717.26
8.1.60.0000.00817.47
8.1.50.0060.00317.48
8.1.40.0000.00817.55
8.1.30.0030.00617.52
8.1.20.0030.00517.70
8.1.10.0030.00617.58
8.1.00.0000.00817.47
8.0.300.0050.00318.77
8.0.290.0000.00816.63
8.0.280.0040.00418.38
8.0.270.0040.00417.11
8.0.260.0000.00617.19
8.0.250.0040.00416.84
8.0.240.0030.00716.86
8.0.230.0030.00716.82
8.0.220.0000.00716.88
8.0.210.0030.00816.77
8.0.200.0000.00616.89
8.0.190.0030.00516.91
8.0.180.0070.00016.88
8.0.170.0040.00416.70
8.0.160.0030.00516.77
8.0.150.0040.00416.68
8.0.140.0040.00716.68
8.0.130.0030.00313.29
8.0.120.0040.00416.86
8.0.110.0000.00716.76
8.0.100.0070.00016.76
8.0.90.0000.00716.90
8.0.80.0090.00616.86
8.0.70.0080.00016.64
8.0.60.0040.00416.70
8.0.50.0040.00416.70
8.0.30.0100.01017.05
8.0.20.0130.00617.40
8.0.10.0040.00417.02
8.0.00.0100.00716.75
7.4.330.0000.00515.08
7.4.320.0060.00016.47
7.4.300.0000.00616.55
7.4.290.0040.00416.61
7.4.280.0040.00416.59
7.4.270.0040.00416.59
7.4.260.0070.00016.57
7.4.250.0040.00416.60
7.4.240.0050.00216.55
7.4.230.0040.00416.45
7.4.220.0090.00916.67
7.4.210.0110.00416.43
7.4.200.0030.00316.61
7.4.160.0050.01016.47
7.4.150.0140.00417.40
7.4.140.0140.01017.86
7.4.130.0130.00816.65
7.4.120.0130.00716.60
7.4.110.0100.01316.64
7.4.100.0060.01516.43
7.4.90.0100.00716.40
7.4.80.0110.00919.39
7.4.70.0060.01116.34
7.4.60.0030.01516.61
7.4.50.0000.00816.52
7.4.40.0120.00416.41
7.4.30.0120.00316.58
7.4.00.0060.00914.75
7.3.330.0040.00313.22
7.3.320.0000.00513.31
7.3.310.0070.00016.32
7.3.300.0070.00016.23
7.3.290.0050.00916.30
7.3.280.0090.00716.38
7.3.270.0100.00717.40
7.3.260.0160.00316.68
7.3.250.0070.01216.45
7.3.240.0100.00716.57
7.3.230.0140.00316.39
7.3.210.0090.00916.65
7.3.200.0030.01616.59
7.3.190.0100.00616.56
7.3.180.0140.00416.24
7.3.170.0030.01316.53
7.3.160.0070.01016.49
7.2.330.0090.00916.72
7.2.320.0090.00916.23
7.2.310.0070.01016.42
7.2.300.0060.01216.57
7.2.290.0110.00616.54
7.2.80.0030.00716.50
7.2.60.0070.00716.68
7.2.00.0040.01419.43
7.1.200.0030.00915.37
7.1.100.0110.00018.03
7.1.70.0050.00316.86
7.1.60.0100.01620.03
7.1.50.0110.01117.05
7.1.00.0070.07322.45
7.0.200.0060.00616.66
7.0.60.0070.07720.04
7.0.50.0070.05717.95
7.0.40.0100.08320.40
7.0.30.0130.04720.10
7.0.20.0170.08720.22
7.0.10.0130.08020.17
7.0.00.0200.07020.33
5.6.280.0070.04321.00
5.6.210.0100.07020.75
5.6.200.0030.06318.20
5.6.190.0100.07020.48
5.6.180.0200.07720.57
5.6.170.0270.08020.55
5.6.160.0000.07020.71
5.6.150.0100.06718.18
5.6.140.0000.04018.28
5.6.130.0130.03018.23
5.6.120.0030.05721.02
5.6.110.0030.04321.03
5.6.100.0130.07721.04
5.6.90.0030.07321.13
5.6.80.0130.07020.51
5.5.350.0070.08020.39
5.5.340.0130.06018.05
5.5.330.0000.04320.35
5.5.320.0070.07720.29
5.5.310.0200.05320.27
5.5.300.0070.08317.98
5.5.290.0100.06718.07
5.5.280.0100.04020.96
5.5.270.0100.07720.75
5.5.260.0070.08020.75
5.5.250.0130.06720.70
5.5.240.0070.03020.19
5.4.450.0900.06719.61
5.4.440.0570.05719.30
5.4.430.0570.05019.44
5.4.420.0730.04719.48
5.4.410.0470.05719.49
5.4.400.0630.06019.14
5.4.390.0570.06018.98
5.4.380.0500.05019.16
5.4.370.0500.05319.28
5.4.360.0600.06018.86
5.4.350.0670.04719.02
5.4.340.0570.06019.30
5.4.320.0730.04319.06
5.4.310.0600.05019.30
5.4.300.0700.05319.37
5.4.290.0530.04719.27
5.4.280.0530.05319.29
5.4.270.0470.05318.86
5.4.260.0670.05019.28
5.4.250.0700.05019.37
5.4.240.0730.05319.05
5.4.230.0670.05019.27
5.4.220.0470.05019.24
5.4.210.0030.06718.87
5.4.200.0130.05016.69
5.4.190.0330.04019.02
5.4.180.0130.05019.16
5.4.170.0170.07019.00
5.4.160.0230.05019.12
5.4.150.0270.04319.33
5.4.140.0270.04316.31
5.4.130.0200.05016.50
5.4.120.0370.05316.53
5.4.110.0200.06316.38
5.4.100.0100.06716.50
5.4.90.0200.05016.48
5.4.80.0170.05016.48
5.4.70.0130.05316.40
5.4.60.0070.05716.41
5.4.50.0200.06016.29
5.4.40.0170.05016.48
5.4.30.0130.05316.29
5.4.20.0100.05716.52
5.4.10.0170.04716.53
5.4.00.0100.05315.85

preferences:
50.54 ms | 400 KiB | 5 Q