3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = ["subject" => "1"]; $json = json_encode($array); $decoded = json_decode($json); $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.0060.00918.30
8.3.50.0070.01016.50
8.3.40.0140.00718.66
8.3.30.0070.01018.67
8.3.20.0050.00320.20
8.3.10.0030.00721.90
8.3.00.0040.00419.79
8.2.180.0170.00018.16
8.2.170.0110.00422.96
8.2.160.0120.00918.96
8.2.150.0000.00824.18
8.2.140.0000.00724.66
8.2.130.0000.00820.93
8.2.120.0050.00226.35
8.2.110.0100.00020.52
8.2.100.0120.00017.78
8.2.90.0000.00819.17
8.2.80.0090.00018.04
8.2.70.0040.00417.63
8.2.60.0030.00617.93
8.2.50.0040.00418.10
8.2.40.0040.00420.68
8.2.30.0080.00019.12
8.2.20.0070.00017.97
8.2.10.0040.00418.25
8.2.00.0000.00718.10
8.1.280.0120.00325.92
8.1.270.0070.00022.25
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0000.00822.61
8.1.230.0080.00319.01
8.1.220.0030.00617.74
8.1.210.0040.00418.77
8.1.200.0030.00617.22
8.1.190.0040.00417.10
8.1.180.0000.00918.10
8.1.170.0080.00018.65
8.1.160.0020.00519.01
8.1.150.0030.00819.00
8.1.140.0000.00719.56
8.1.130.0000.00718.87
8.1.120.0040.00417.40
8.1.110.0000.00817.37
8.1.100.0040.00417.50
8.1.90.0050.00317.45
8.1.80.0070.00017.51
8.1.70.0000.00717.44
8.1.60.0040.00417.46
8.1.50.0000.00817.52
8.1.40.0050.00317.44
8.1.30.0080.00017.64
8.1.20.0040.00417.67
8.1.10.0070.00017.52
8.1.00.0000.00817.30
8.0.300.0040.00418.77
8.0.290.0050.00316.75
8.0.280.0000.00718.38
8.0.270.0000.00717.30
8.0.260.0000.00816.73
8.0.250.0030.00316.95
8.0.240.0060.00316.93
8.0.230.0030.00316.95
8.0.220.0050.00316.89
8.0.210.0040.00416.95
8.0.200.0000.00616.97
8.0.190.0080.00417.02
8.0.180.0030.00516.89
8.0.170.0000.00716.86
8.0.160.0040.00416.88
8.0.150.0030.00316.79
8.0.140.0030.00316.76
8.0.130.0000.00713.36
8.0.120.0040.00416.84
8.0.110.0000.00716.66
8.0.100.0000.00716.88
8.0.90.0000.00816.77
8.0.80.0090.00616.91
8.0.70.0030.00616.87
8.0.60.0040.00316.71
8.0.50.0040.00416.78
8.0.30.0120.00717.12
8.0.20.0150.01117.40
8.0.10.0070.00017.01
8.0.00.0140.00716.71
7.4.330.0030.00315.55
7.4.320.0060.00016.61
7.4.300.0030.00316.50
7.4.290.0030.00316.59
7.4.280.0030.00616.49
7.4.270.0000.00716.47
7.4.260.0050.00316.63
7.4.250.0000.00716.62
7.4.240.0070.00016.50
7.4.230.0040.00416.70
7.4.220.0090.00916.64
7.4.210.0100.01016.57
7.4.200.0050.00216.48
7.4.160.0060.00916.49
7.4.150.0110.00717.40
7.4.140.0090.01417.86
7.4.130.0160.01016.38
7.4.120.0120.01016.57
7.4.110.0090.00916.56
7.4.100.0110.00716.33
7.4.90.0060.01216.45
7.4.80.0150.00319.39
7.4.70.0100.00616.69
7.4.60.0140.00316.30
7.4.50.0000.01616.49
7.4.40.0110.01116.27
7.4.30.0140.01416.44
7.4.00.0050.01114.87
7.3.330.0050.00013.17
7.3.320.0070.00013.18
7.3.310.0040.00416.13
7.3.300.0030.00316.13
7.3.290.0110.00416.26
7.3.280.0090.00816.27
7.3.270.0080.00817.40
7.3.260.0100.00816.49
7.3.250.0130.00416.50
7.3.240.0120.00516.42
7.3.230.0070.01016.27
7.3.210.0070.01116.57
7.3.200.0090.01216.37
7.3.190.0130.00316.18
7.3.180.0100.00616.35
7.3.170.0130.00316.50
7.3.160.0060.01016.29
7.3.120.0090.00614.45
7.3.110.0080.00614.84
7.3.100.0090.00914.88
7.3.90.0100.00714.85
7.3.80.0030.01314.80
7.3.70.0110.00714.61
7.3.60.0090.00914.76
7.3.50.0130.00014.68
7.3.40.0000.01414.39
7.3.30.0060.00614.93
7.3.20.0070.01016.35
7.3.10.0060.00916.72
7.3.00.0060.00316.72
7.2.330.0050.01116.54
7.2.320.0170.00316.52
7.2.310.0030.01316.66
7.2.300.0090.01516.76
7.2.290.0090.01216.46
7.2.250.0070.01015.23
7.2.240.0130.00614.89
7.2.230.0000.01315.25
7.2.220.0030.01014.78
7.2.210.0170.00014.91
7.2.200.0060.00614.88
7.2.190.0100.00715.17
7.2.180.0070.00314.99
7.2.170.0110.00415.07
7.2.60.0040.01117.09
7.2.00.0040.00719.27
7.1.330.0000.01115.92
7.1.320.0060.00815.62
7.1.310.0070.01015.71
7.1.300.0030.01216.00
7.1.290.0030.01015.69
7.1.280.0040.00715.96
7.1.270.0070.00715.80
7.1.260.0150.00015.47
7.1.200.0000.01115.48
7.1.100.0030.00917.82
7.1.70.0070.00017.65
7.1.60.0000.01117.65
7.1.50.0110.00717.65
7.1.40.0070.01417.65
7.1.30.0080.00317.65
7.1.20.0080.00317.65
7.1.10.0000.00717.65
7.1.00.0020.00517.65
7.0.200.0040.00417.65
7.0.190.0000.00817.65
7.0.180.0030.01317.65
7.0.170.0030.00717.65
7.0.160.0000.00717.65
7.0.150.0000.00717.65
7.0.140.0020.00517.65
7.0.130.0060.00317.65
7.0.120.0040.00417.65
7.0.110.0070.00317.65
7.0.100.0000.00917.65
7.0.90.0040.00717.65
7.0.80.0040.00417.65
7.0.70.0000.00817.65
7.0.60.0000.00717.65
7.0.50.0040.00417.65
7.0.40.0040.00417.65
7.0.30.0040.00417.65
7.0.20.0040.00417.65
7.0.10.0050.00317.65
7.0.00.0000.00817.65

preferences:
40.49 ms | 401 KiB | 5 Q