3v4l.org

run code in 300+ PHP versions simultaneously
<?php //I set up 2 arrays, the $idArray to use in the 2nd API call and $testNull $idArray = array(); $testNull = array(); $results = [ ['id'=>1],['id'=>2],['id'=>3],['id'=>4], ['id'=>5],['id'=>6],['id'=>1],['id'=>8], ['id'=>9],['id'=>10],['id'=>11],['id'=>12], ['id'=>13],['id'=>14],['id'=>15],['id'=>16], ['id'=>17],['id'=>18],['id'=>19],['id'=>20], ]; //the JSON response is decoded previously and here I go through the first 20 results for($j = 0; $j < 20; $j++){ //Here I put the ID of each venue into $busID $busID = $results[$j]['id']; //In case the result is null I have set up this if statement if(!empty($busID)){ //This is echoing out the IDs of the venues correctly echo $busID; //and here the problem lies - just can't get the IDs in $idArray array_push($idArray, $busID); }else{ //I set this up just to test NUll responses from the 1st API call. array_push($testNull, $busID); } } var_dump($idArray); var_dump($testNull);

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.0160.00616.75
8.3.50.0140.00821.86
8.3.40.0130.00618.82
8.3.30.0120.00318.67
8.3.20.0040.00418.96
8.3.10.0040.00421.72
8.3.00.0000.00919.05
8.2.180.0000.01418.54
8.2.170.0070.01122.96
8.2.160.0040.01120.39
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00420.75
8.2.120.0030.00626.35
8.2.110.0060.00321.13
8.2.100.0030.00918.02
8.2.90.0000.00918.03
8.2.80.0000.00817.97
8.2.70.0030.00517.93
8.2.60.0040.00418.22
8.2.50.0060.00318.10
8.2.40.0080.00020.59
8.2.30.0040.00419.36
8.2.20.0060.00318.00
8.2.10.0000.00718.18
8.2.00.0040.00417.74
8.1.280.0110.00425.92
8.1.270.0080.00022.09
8.1.260.0000.00828.09
8.1.250.0040.00428.09
8.1.240.0080.00023.96
8.1.230.0040.00822.82
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0060.00617.35
8.1.190.0030.00517.23
8.1.180.0040.00418.10
8.1.170.0090.00018.50
8.1.160.0000.00718.92
8.1.150.0040.00420.32
8.1.140.0040.00419.62
8.1.130.0030.00317.70
8.1.120.0040.00417.33
8.1.110.0040.00717.46
8.1.100.0030.00517.46
8.1.90.0000.00717.50
8.1.80.0000.00717.39
8.1.70.0030.00317.47
8.1.60.0000.00817.57
8.1.50.0000.00817.54
8.1.40.0040.00417.42
8.1.30.0060.00317.64
8.1.20.0040.00417.47
8.1.10.0050.00317.50
8.1.00.0000.00817.52
8.0.300.0040.00419.84
8.0.290.0060.00316.75
8.0.280.0070.00018.36
8.0.270.0040.00417.36
8.0.260.0070.00017.25
8.0.250.0070.00016.94
8.0.240.0030.00316.96
8.0.230.0040.00416.90
8.0.220.0040.00416.91
8.0.210.0000.00716.76
8.0.200.0040.00417.03
8.0.190.0050.00516.84
8.0.180.0000.00716.97
8.0.170.0040.00416.80
8.0.160.0040.00416.95
8.0.150.0040.00416.80
8.0.140.0000.00716.86
8.0.130.0030.00513.35
8.0.120.0040.00416.84
8.0.110.0070.00016.87
8.0.100.0000.00716.75
8.0.90.0040.00416.78
8.0.80.0060.01016.84
8.0.70.0020.00516.70
8.0.60.0080.00016.95
8.0.50.0040.00416.82
8.0.30.0060.01217.18
8.0.20.0090.01117.40
8.0.10.0080.00017.00
8.0.00.0110.00716.67
7.4.330.0030.00315.55
7.4.320.0040.00416.52
7.4.300.0000.00716.50
7.4.290.0030.00316.42
7.4.280.0050.00316.59
7.4.270.0070.00016.61
7.4.260.0080.00316.41
7.4.250.0040.00416.45
7.4.240.0040.00316.55
7.4.230.0040.00416.63
7.4.220.0070.01316.57
7.4.210.0060.01016.65
7.4.200.0000.00816.56
7.4.160.0130.00516.56
7.4.150.0040.01517.40
7.4.140.0070.01017.86
7.4.130.0150.00516.34
7.4.120.0090.00916.33
7.4.110.0140.00716.52
7.4.100.0150.00316.45
7.4.90.0090.00916.58
7.4.80.0110.01119.39
7.4.70.0060.01016.44
7.4.60.0060.01316.33
7.4.50.0060.01016.32
7.4.40.0110.00616.36
7.4.30.0080.01016.45
7.4.00.0040.00815.10
7.3.330.0060.00013.06
7.3.320.0000.00613.11
7.3.310.0040.00416.18
7.3.300.0030.00316.23
7.3.290.0050.00916.32
7.3.280.0110.01016.36
7.3.270.0100.01017.40
7.3.260.0070.01016.37
7.3.250.0080.01216.39
7.3.240.0120.00616.45
7.3.230.0140.00316.39
7.3.210.0100.00716.57
7.3.200.0090.00916.46
7.3.190.0060.01216.67
7.3.180.0040.01216.42
7.3.170.0140.00816.45
7.3.160.0060.01316.58
7.2.330.0090.00816.74
7.2.320.0070.01016.43
7.2.310.0070.01716.68
7.2.300.0190.00516.53
7.2.290.0050.01316.67
7.2.00.0070.01019.45
7.1.70.0000.01017.35
7.1.60.0030.01017.25
7.1.00.0000.08022.40
7.0.200.0030.00815.04
7.0.130.0130.05322.09
7.0.120.0130.05322.18
7.0.110.0100.05722.19
7.0.100.0200.04322.05
7.0.90.0070.06022.22
7.0.80.0000.06022.05
7.0.70.0170.04322.05
7.0.60.0030.07721.94
7.0.50.0070.05722.07
7.0.40.0000.06022.09
7.0.30.0130.04722.08
7.0.20.0070.05322.05
7.0.10.0070.05322.14
7.0.00.0070.05322.09
5.6.280.0100.05320.92
5.6.270.0070.05321.00
5.6.260.0100.05020.99
5.6.250.0170.04720.79
5.6.240.0000.06321.11
5.6.230.0130.06720.85
5.6.220.0200.06320.73
5.6.210.0000.06320.97
5.6.200.0070.06721.02
5.6.190.0000.06321.03
5.6.180.0030.07321.03
5.6.170.0100.05020.95
5.6.160.0100.05021.01
5.6.150.0130.05321.00
5.6.140.0000.06720.93
5.6.130.0030.05721.04
5.6.120.0100.06321.04
5.6.110.0100.05320.75
5.6.100.0000.06320.91
5.6.90.0130.04720.99
5.6.80.0100.07020.39
5.6.70.0100.05020.35
5.6.60.0070.05320.38
5.6.50.0100.05320.42
5.6.40.0030.05720.40
5.6.30.0130.04720.17
5.6.20.0100.05020.44
5.6.10.0070.05720.37
5.6.00.0130.04720.28

preferences:
34.86 ms | 401 KiB | 5 Q