3v4l.org

run code in 300+ PHP versions simultaneously
<?php $location = "NewYork"; $return_arr = array(); $json = file_get_contents('https://maps.googleapis.com/maps/api/geocode/json?address='. $location .'&key=AIzaSyCdKLDXk7VD2GUyLLWOhv-WjQGtvzx2LCg'); $obj = json_decode($json, true); $lat = $obj['results'][0]['geometry']['location']['lat']; $lng = $obj['results'][0]['geometry']['location']['lng']; $sql = "SELECT *, ( 3959 * acos ( cos ( radians($lat) ) * cos( radians( latitude ) ) * cos( radians( longitude ) - radians($lng) ) + sin ( radians($lat) ) * sin( radians( latitude ) ) ) ) AS distance FROM Events HAVING distance < 30 ORDER BY distance"; $fetch = mysqli_query($conn, $sql); while ($row = mysqli_fetch_array($fetch, MYSQLI_ASSOC)) { $row_array['title'] = $row['title']; $row_array['description'] = $row['description']; $row_array['start'] = $row['start']; $row_array['end'] = $row['end']; $row_array['website'] = $row['website']; $row_array['logo_url'] = $row['logo_url']; $row_array['online_event'] = $row['online_event']; $row_array['url'] = $row['url']; $row_array['venue'] = $row['venue']; array_push($return_arr,$row_array); } echo json_encode($return_arr); mysqli_close($conn);

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.0120.00918.68
8.3.50.0110.00921.10
8.3.40.0120.00318.97
8.3.30.0060.00918.80
8.3.20.0050.00320.34
8.3.10.0000.00821.91
8.3.00.0000.00819.43
8.2.180.0120.00917.00
8.2.170.0090.00622.96
8.2.160.0070.00720.20
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00017.75
8.2.110.0090.00021.99
8.2.100.0080.00417.88
8.2.90.0060.00319.39
8.2.80.0040.00417.97
8.2.70.0000.00817.75
8.2.60.0000.00917.93
8.2.50.0120.00018.07
8.2.40.0000.00819.30
8.2.30.0090.00019.96
8.2.20.0040.00417.76
8.2.10.0030.00618.20
8.2.00.0040.00418.24
8.1.280.0140.00325.92
8.1.270.0050.00322.02
8.1.260.0100.00026.35
8.1.250.0060.00328.09
8.1.240.0090.00022.55
8.1.230.0030.00917.60
8.1.220.0000.00817.78
8.1.210.0060.00318.77
8.1.200.0060.00317.47
8.1.190.0030.00517.35
8.1.180.0040.00418.10
8.1.170.0000.00818.67
8.1.160.0040.00422.07
8.1.150.0040.00418.95
8.1.140.0030.00517.43
8.1.130.0040.00417.71
8.1.120.0050.00217.55
8.1.110.0040.00417.44
8.1.100.0040.00417.44
8.1.90.0000.00717.50
8.1.80.0030.00517.53
8.1.70.0030.00317.36
8.1.60.0040.00417.53
8.1.50.0050.00317.53
8.1.40.0030.00917.57
8.1.30.0080.00017.75
8.1.20.0050.00317.64
8.1.10.0000.00917.64
8.1.00.0030.00617.58
8.0.300.0000.00818.77
8.0.290.0000.00816.88
8.0.280.0000.00718.57
8.0.270.0000.00717.39
8.0.260.0030.00617.33
8.0.250.0050.00317.09
8.0.240.0040.00417.18
8.0.230.0040.00417.01
8.0.220.0040.00417.04
8.0.210.0040.00416.98
8.0.200.0040.00417.13
8.0.190.0000.00817.13
8.0.180.0000.00817.16
8.0.170.0060.00316.99
8.0.160.0070.00017.01
8.0.150.0080.00016.98
8.0.140.0000.00717.01
8.0.130.0060.00313.48
8.0.120.0050.00316.93
8.0.110.0080.00016.90
8.0.100.0040.00416.95
8.0.90.0000.00716.99
8.0.80.0130.00317.03
8.0.70.0070.00016.92
8.0.60.0000.00817.04
8.0.50.0040.00417.14
8.0.30.0080.01117.13
8.0.20.0090.01117.40
8.0.10.0050.00217.11
8.0.00.0070.01016.70
7.4.330.0030.00315.09
7.4.320.0000.00616.51
7.4.300.0030.00316.65
7.4.290.0000.00916.58
7.4.280.0000.01016.47
7.4.270.0000.00716.62
7.4.260.0000.00716.46
7.4.250.0000.00716.50
7.4.240.0020.00516.63
7.4.230.0000.00716.54
7.4.220.0190.00616.49
7.4.210.0080.00716.60
7.4.200.0000.00716.59
7.4.160.0130.00316.79
7.4.150.0150.00417.40
7.4.140.0080.01017.86
7.4.130.0130.00816.73
7.4.120.0140.00416.66
7.4.110.0100.01316.51
7.4.100.0070.01716.50
7.4.90.0090.00916.69
7.4.80.0060.01319.39
7.4.70.0060.01116.50
7.4.60.0160.00716.59
7.4.50.0030.00616.27
7.4.40.0040.01216.70
7.4.30.0060.01516.54
7.4.00.0130.00515.11
7.3.330.0030.00313.39
7.3.320.0000.00613.39
7.3.310.0040.00416.50
7.3.300.0070.00016.63
7.3.290.0070.00016.50
7.3.280.0080.01016.51
7.3.270.0100.01317.40
7.3.260.0150.00316.38
7.3.250.0070.01116.39
7.3.240.0060.01216.30
7.3.230.0090.00916.55
7.3.210.0100.00716.39
7.3.200.0060.00916.47
7.3.190.0050.01116.55
7.3.180.0150.00016.49
7.3.170.0140.00716.34
7.3.160.0140.00716.70
7.3.120.0040.01015.06
7.3.110.0100.01014.98
7.3.100.0000.01414.96
7.3.90.0110.00314.90
7.3.80.0040.00814.89
7.3.70.0030.00615.02
7.3.60.0060.00615.06
7.3.50.0120.00315.01
7.3.40.0100.00315.05
7.3.30.0030.01014.97
7.3.20.0060.00916.51
7.3.10.0080.00616.80
7.3.00.0080.00616.65
7.2.330.0040.01416.76
7.2.320.0030.01616.82
7.2.310.0150.00716.76
7.2.300.0090.00916.88
7.2.290.0120.00616.85
7.2.250.0130.00615.29
7.2.240.0110.01115.29
7.2.230.0060.00615.36
7.2.220.0030.00915.43
7.2.210.0060.00615.39
7.2.200.0040.01415.33
7.2.190.0060.01015.17
7.2.180.0070.00715.21
7.2.170.0100.00615.17
7.2.130.0100.00617.02
7.2.120.0090.00517.05
7.2.110.0090.00716.91
7.2.100.0120.00316.79
7.2.90.0050.01016.88
7.2.80.0060.00816.84
7.2.70.0060.00717.05
7.2.60.0090.00716.94
7.2.50.0060.00616.85
7.2.40.0060.01116.77
7.2.30.0040.01016.84
7.2.20.0090.00616.77
7.2.10.0080.00516.80
7.2.00.0070.00717.89
7.1.330.0000.01516.08
7.1.320.0030.01015.57
7.1.310.0060.00615.74
7.1.300.0030.01215.57
7.1.290.0090.00015.78
7.1.280.0060.00915.75
7.1.270.0000.01215.61
7.1.260.0000.01315.68
7.1.250.0050.01015.74
7.1.240.0040.00615.94
7.1.230.0110.00315.76
7.1.220.0060.00815.84
7.1.210.0120.00415.75
7.1.200.0070.00715.79
7.1.190.0080.00515.86
7.1.180.0100.00415.68
7.1.170.0080.00615.58
7.1.160.0080.00715.79
7.1.150.0030.00815.74
7.1.140.0050.01115.71
7.1.130.0050.00915.85
7.1.120.0060.00815.85
7.1.110.0050.00915.88
7.1.100.0030.00916.57
7.1.90.0060.00515.79
7.1.80.0060.00715.73
7.1.70.0070.00716.30
7.1.60.0060.01117.00
7.1.50.0080.00722.22
7.1.40.0040.01215.79
7.1.30.0040.00715.78
7.1.20.0020.01115.62
7.1.10.0100.00415.81
7.1.00.0070.02818.11
7.0.330.0060.00615.28
7.0.320.0050.00915.19
7.0.310.0050.01115.18
7.0.300.0070.00715.30
7.0.290.0030.00915.25
7.0.280.0070.00715.56
7.0.270.0050.00915.31
7.0.260.0040.00915.34
7.0.250.0070.00715.20
7.0.240.0070.00615.48
7.0.230.0040.00615.52
7.0.220.0080.00415.29
7.0.210.0050.00915.17
7.0.200.0070.00815.88
7.0.190.0070.00515.45
7.0.180.0140.00315.29
7.0.170.0080.00615.46
7.0.160.0080.00615.34
7.0.150.0110.00515.46
7.0.140.0050.01015.35
7.0.130.0130.00315.46
7.0.120.0070.00815.49
7.0.110.0070.00715.35
7.0.100.0060.00615.46
7.0.90.0190.03117.13
7.0.80.0300.02817.06
7.0.70.0230.02017.10
7.0.60.0290.02417.10
7.0.50.0260.03317.24
7.0.40.0090.02415.90
7.0.30.0090.02615.84
7.0.20.0070.03115.94
7.0.10.0030.02715.85
7.0.00.0070.02115.85
5.6.380.0060.00814.24
5.6.370.0030.01214.52
5.6.360.0050.00914.20
5.6.350.0110.00314.50
5.6.340.0060.00614.24
5.6.330.0030.00714.35
5.6.320.0020.01114.30
5.6.310.0070.00614.49
5.6.300.0080.00314.48
5.6.290.0030.01214.23
5.6.280.0070.01516.75
5.6.270.0020.01214.21
5.6.260.0050.00614.23
5.6.250.0080.00714.45
5.6.240.0060.03016.66
5.6.230.0050.02616.54
5.6.220.0090.02416.46
5.6.210.0090.02916.71
5.6.200.0070.03216.81
5.6.190.0090.02816.56
5.6.180.0100.02616.77
5.6.170.0050.03416.74
5.6.160.0090.02316.59
5.6.150.0040.03016.73
5.6.140.0060.01916.53
5.6.130.0110.03016.68
5.6.120.0080.03016.66
5.6.110.0050.02216.57
5.6.100.0100.02816.61
5.6.90.0100.02916.74
5.6.80.0120.02816.50
5.6.70.0080.02216.33
5.6.60.0050.02216.42
5.6.50.0070.03216.67
5.6.40.0070.01716.31
5.6.30.0080.01716.40
5.6.20.0090.01916.54
5.6.10.0080.02716.51
5.6.00.0090.02916.49
5.5.380.0090.02614.23
5.5.370.0030.01814.30
5.5.360.0080.03014.19
5.5.350.0070.02614.35
5.5.340.0040.02614.42
5.5.330.0060.02914.54
5.5.320.0030.01914.46
5.5.310.0060.03114.40
5.5.300.0040.02214.42
5.5.290.0020.02214.32
5.5.280.0030.02414.43
5.5.270.0050.03314.47
5.5.260.0060.02314.38
5.5.250.0090.02614.29
5.5.240.0030.03314.22
5.5.230.0070.02714.24
5.5.220.0060.01714.04
5.5.210.0060.02614.17
5.5.200.0060.01914.21
5.5.190.0080.01814.10
5.5.180.0040.03114.06
5.5.170.0050.00611.07
5.5.160.0050.02414.11
5.5.150.0060.02514.15
5.5.140.0060.02114.16
5.5.130.0020.03014.18
5.5.120.0030.03214.12
5.5.110.0080.01314.14
5.5.100.0040.01914.20
5.5.90.0060.02814.13
5.5.80.0050.03114.06
5.5.70.0040.02914.31
5.5.60.0070.02914.13
5.5.50.0050.01914.18
5.5.40.0050.03014.24
5.5.30.0060.02814.16
5.5.20.0070.02814.11
5.5.10.0060.02814.17
5.5.00.0050.01914.18
5.4.450.0080.01813.88
5.4.440.0070.01614.01
5.4.430.0070.01814.03
5.4.420.0050.03313.84
5.4.410.0060.02613.93
5.4.400.0050.02713.85
5.4.390.0050.02213.74
5.4.380.0090.01413.68
5.4.370.0100.02713.83
5.4.360.0080.01913.87
5.4.350.0020.01713.75
5.4.340.0030.02013.89
5.4.330.0050.00510.97
5.4.320.0080.02813.81
5.4.310.0040.02013.82
5.4.300.0030.01813.72
5.4.290.0070.01413.81
5.4.280.0040.01713.71
5.4.270.0060.01513.89
5.4.260.0060.02513.84
5.4.250.0050.01613.80
5.4.240.0020.02113.90
5.4.230.0070.01613.80
5.4.220.0060.02513.79
5.4.210.0060.01713.85
5.4.200.0110.02613.71
5.4.190.0070.02913.78
5.4.180.0050.02813.79
5.4.170.0070.01813.76
5.4.160.0050.01913.63
5.4.150.0100.02613.80
5.4.140.0090.02712.61
5.4.130.0020.03112.87
5.4.120.0040.03012.76
5.4.110.0030.02312.74
5.4.100.0050.02912.71
5.4.90.0090.02312.71
5.4.80.0080.01912.71
5.4.70.0070.02812.76
5.4.60.0040.02912.78
5.4.50.0110.02212.79
5.4.40.0080.02512.86
5.4.30.0050.02912.74
5.4.20.0090.02512.74
5.4.10.0070.02612.88
5.4.00.0030.02012.61

preferences:
51.64 ms | 401 KiB | 5 Q