3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = ["subject" => "1"]; $json = json_encode($array); $decoded = json_decode($json, true); $val = 0; if (!isset($decoded->subject) || $decoded->subject === '') { $val = 5; } echo $val;

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.0090.01218.17
8.3.50.0100.00716.23
8.3.40.0070.00718.74
8.3.30.0130.00318.41
8.3.20.0060.00320.16
8.3.10.0090.00321.84
8.3.00.0080.00019.53
8.2.180.0030.01418.16
8.2.170.0070.00722.96
8.2.160.0090.00918.91
8.2.150.0080.00024.18
8.2.140.0030.00624.66
8.2.130.0040.00419.32
8.2.120.0000.00826.35
8.2.110.0030.00620.38
8.2.100.0000.01217.84
8.2.90.0030.00519.23
8.2.80.0050.00318.04
8.2.70.0030.00617.63
8.2.60.0040.00417.92
8.2.50.0000.00818.10
8.2.40.0000.00720.47
8.2.30.0040.00419.13
8.2.20.0040.00418.04
8.2.10.0040.00418.11
8.2.00.0070.00018.12
8.1.280.0090.00625.92
8.1.270.0050.00222.05
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0090.00022.73
8.1.230.0070.00319.16
8.1.220.0040.00417.76
8.1.210.0040.00418.77
8.1.200.0040.00417.35
8.1.190.0080.00017.35
8.1.180.0080.00018.10
8.1.170.0030.00618.62
8.1.160.0030.00519.00
8.1.150.0050.00518.73
8.1.140.0000.00719.57
8.1.130.0050.00318.89
8.1.120.0080.00017.44
8.1.110.0030.00517.43
8.1.100.0000.00817.32
8.1.90.0030.00517.45
8.1.80.0030.00317.42
8.1.70.0030.00317.49
8.1.60.0050.00317.59
8.1.50.0000.00817.55
8.1.40.0000.00817.36
8.1.30.0000.00817.70
8.1.20.0090.00017.59
8.1.10.0080.00017.41
8.1.00.0020.00517.32
8.0.300.0000.00718.77
8.0.290.0070.00016.63
8.0.280.0070.00018.38
8.0.270.0030.00317.19
8.0.260.0030.00316.80
8.0.250.0070.00016.95
8.0.240.0060.00316.91
8.0.230.0030.00316.86
8.0.220.0000.00716.80
8.0.210.0000.00716.88
8.0.200.0000.00616.92
8.0.190.0040.00716.95
8.0.180.0070.00016.90
8.0.170.0040.00416.81
8.0.160.0000.00816.79
8.0.150.0020.00516.82
8.0.140.0000.00716.74
8.0.130.0000.00813.36
8.0.120.0030.00516.77
8.0.110.0070.00016.84
8.0.100.0070.00016.88
8.0.90.0040.00417.01
8.0.80.0060.00916.89
8.0.70.0030.00516.80
8.0.60.0040.00416.92
8.0.50.0070.00016.98
8.0.30.0110.00917.11
8.0.20.0090.01217.41
8.0.10.0050.00216.94
8.0.00.0120.01216.56
7.4.330.0040.00415.55
7.4.320.0000.00816.61
7.4.300.0000.00616.50
7.4.290.0030.00316.51
7.4.280.0000.00816.59
7.4.270.0000.00716.51
7.4.260.0080.00016.61
7.4.250.0040.00416.57
7.4.240.0070.00016.53
7.4.230.0030.00316.59
7.4.220.0100.01016.69
7.4.210.0050.00916.63
7.4.200.0030.00316.60
7.4.160.0110.00816.44
7.4.150.0110.00617.40
7.4.140.0130.00717.86
7.4.130.0150.00916.46
7.4.120.0080.01216.52
7.4.110.0170.00316.40
7.4.100.0090.00916.53
7.4.90.0130.00316.27
7.4.80.0120.00619.39
7.4.70.0080.00816.50
7.4.60.0060.01016.42
7.4.50.0040.00816.60
7.4.40.0120.00616.26
7.4.30.0060.01316.52
7.4.00.0030.01415.09
7.3.330.0050.00012.95
7.3.320.0000.00513.03
7.3.310.0080.00016.34
7.3.300.0030.00316.09
7.3.290.0110.00516.21
7.3.280.0110.00516.22
7.3.270.0070.01017.40
7.3.260.0110.01016.30
7.3.250.0140.00516.31
7.3.240.0080.01016.40
7.3.230.0110.00716.44
7.3.210.0030.01316.29
7.3.200.0120.00616.23
7.3.190.0100.00616.22
7.3.180.0060.01216.23
7.3.170.0090.00616.09
7.3.160.0140.00816.20
7.3.10.0100.00516.34
7.3.00.0050.00816.79
7.2.330.0100.00616.60
7.2.320.0130.01016.31
7.2.310.0080.00816.66
7.2.300.0140.00516.65
7.2.290.0120.00616.68
7.2.130.0080.00716.78
7.2.120.0090.00716.79
7.2.110.0100.00516.79
7.2.100.0070.00716.83
7.2.90.0120.00516.86
7.2.80.0100.00416.68
7.2.70.0070.00416.94
7.2.60.0070.00916.71
7.2.50.0090.00716.86
7.2.40.0070.00416.68
7.2.30.0030.01016.87
7.2.20.0100.00416.76
7.2.10.0050.00916.98
7.2.00.0060.00717.57
7.1.250.0080.00415.79
7.1.200.0060.00615.50
7.1.100.0040.00717.90
7.1.70.0030.00916.95
7.1.60.0130.01334.92
7.1.50.0200.00734.58
7.1.40.0150.01434.14
7.1.30.0140.01434.21
7.1.20.0180.00934.45
7.1.10.0070.00716.50
7.1.00.0040.00916.48
7.0.200.0040.00816.74
7.0.190.0000.01216.41
7.0.180.0030.01116.46
7.0.170.0030.01016.12
7.0.160.0060.00616.31
7.0.150.0060.00916.00
7.0.140.0070.00716.25
7.0.130.0000.01316.56
7.0.120.0030.01016.45
7.0.110.0000.01416.39
7.0.100.0060.00916.45
7.0.90.0040.00916.32
7.0.80.0090.00616.29
7.0.70.0080.00816.33
7.0.60.0090.00316.05
7.0.50.0070.00716.16
7.0.40.0030.01416.57
7.0.30.0000.01416.74
7.0.20.0090.00916.59
7.0.10.0030.01016.35
7.0.00.0050.00816.32

preferences:
43.05 ms | 401 KiB | 5 Q