3v4l.org

run code in 300+ PHP versions simultaneously
<html> <head><title>Simple PHP Script to get the Latitude and Longitute using Google API - Blog.Theonlytutorials.com</title></head> <body> <h2>Simple PHP Script to get the Latitude and Longitude using Google API - Blog.Theonlytutorials.com</h2> <br /> <form action="" method="post"> Type Your Location : <input type="text" name="myaddress" /> (eg. Whitefield, Bangalore) </form> <br /> <?php //blog.theonlytutorials.com //author: agurchand if(isset($_POST['myaddress'])){ $myaddress = urlencode($_POST['myaddress']); //here is the google api url $url = "http://maps.googleapis.com/maps/api/geocode/json?address=$myaddress&sensor=false"; //get the content from the api using file_get_contents $getmap = file_get_contents($url); //the result is in json format. To decode it use json_decode $googlemap = json_decode($getmap); //get the latitute, longitude from the json result by doing a for loop foreach($googlemap->results as $res){ $address = $res->geometry; $latlng = $address->location; $formattedaddress = $res->formatted_address; ?> <br /> <!-- Print the Latitude and Longitude --> <?php echo "Latitude: ". $latlng->lat ."<br />". "Longitude:". $latlng->lng; ?> <h2>Dynamic Location on Google Map!</h2> <iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=<?php echo $myaddress;?>&amp;ie=UTF8&amp;hq=&amp;hnear=<?php echo urlencode($formattedaddress);?>&amp;t=m&amp;z=14&amp;iwloc=A&amp;output=embed"></iframe> <?php } } ?> </body> </html>

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.0140.00318.18
8.3.50.0090.00921.08
8.3.40.0070.00718.67
8.3.30.0000.01420.18
8.3.20.0040.00420.21
8.3.10.0000.00821.09
8.3.00.0000.00722.59
8.2.180.0110.00816.63
8.2.170.0070.00722.96
8.2.160.0100.00322.26
8.2.150.0030.00524.18
8.2.140.0030.00524.66
8.2.130.0000.00726.16
8.2.120.0040.00420.65
8.2.110.0070.00319.01
8.2.100.0040.00717.91
8.2.90.0040.00419.05
8.2.80.0040.00417.97
8.2.70.0000.00917.63
8.2.60.0030.00617.99
8.2.50.0080.00018.07
8.2.40.0000.00818.21
8.2.30.0070.00019.34
8.2.20.0000.00717.77
8.2.10.0000.00717.65
8.2.00.0030.00617.65
8.1.280.0090.00625.92
8.1.270.0000.00823.99
8.1.260.0000.00726.35
8.1.250.0070.00028.09
8.1.240.0050.00522.59
8.1.230.0080.00320.95
8.1.220.0040.00418.77
8.1.210.0060.00320.84
8.1.200.0030.00617.23
8.1.190.0040.00417.53
8.1.180.0000.00818.10
8.1.170.0050.00318.59
8.1.160.0040.00818.86
8.1.150.0000.00818.55
8.1.140.0000.00717.37
8.1.130.0000.00717.78
8.1.120.0030.00517.44
8.1.110.0000.00817.28
8.1.100.0000.00717.36
8.1.90.0000.00717.31
8.1.80.0050.00217.45
8.1.70.0000.00717.30
8.1.60.0000.00817.53
8.1.50.0040.00417.49
8.1.40.0040.00417.36
8.1.30.0030.00617.59
8.1.20.0030.00517.55
8.1.10.0040.00417.59
8.1.00.0000.00717.37
8.0.300.0000.00720.03
8.0.290.0070.00017.16
8.0.280.0080.00018.41
8.0.270.0070.00017.18
8.0.260.0000.00716.64
8.0.250.0030.00316.77
8.0.240.0030.00716.89
8.0.230.0040.00416.92
8.0.220.0000.00816.71
8.0.210.0000.00716.82
8.0.200.0060.00016.93
8.0.190.0040.00416.98
8.0.180.0000.01016.79
8.0.170.0030.00316.86
8.0.160.0040.00416.78
8.0.150.0000.00816.88
8.0.140.0030.00616.82
8.0.130.0000.00513.32
8.0.120.0000.00716.79
8.0.110.0050.00316.84
8.0.100.0040.00416.88
8.0.90.0040.00416.74
8.0.80.0080.00816.74
8.0.70.0040.00416.88
8.0.60.0000.00716.89
8.0.50.0000.00816.86
8.0.30.0120.00616.97
8.0.20.0120.00717.40
8.0.10.0000.00716.84
8.0.00.0120.01316.56
7.4.330.0040.00315.13
7.4.320.0040.00416.49
7.4.300.0000.00616.59
7.4.290.0070.00016.42
7.4.280.0000.00716.47
7.4.270.0030.00316.48
7.4.260.0000.00513.26
7.4.250.0040.00416.33
7.4.240.0040.00316.53
7.4.230.0030.00316.31
7.4.220.0090.01016.48
7.4.210.0090.00516.57
7.4.200.0040.00416.30
7.4.190.0000.00716.66
7.4.160.0080.00816.42
7.4.150.0060.01217.40
7.4.140.0130.00317.86
7.4.130.0050.01116.48
7.4.120.0100.00716.41
7.4.110.0070.01016.64
7.4.100.0180.00016.52
7.4.90.0140.00316.45
7.4.80.0030.01319.39
7.4.70.0030.01516.39
7.4.60.0070.01016.46
7.4.50.0000.00716.61
7.4.40.0080.01122.77
7.4.30.0130.00416.30
7.4.00.0060.00814.81
7.3.330.0050.00013.13
7.3.320.0060.00013.14
7.3.310.0030.00316.27
7.3.300.0030.00316.11
7.3.290.0060.00916.22
7.3.280.0050.01116.24
7.3.270.0070.01017.40
7.3.260.0090.00918.24
7.3.250.0080.00816.44
7.3.240.0080.01316.39
7.3.230.0130.01316.44
7.3.210.0110.00616.39
7.3.200.0080.01119.39
7.3.190.0100.00716.26
7.3.180.0090.00616.32
7.3.170.0160.00616.45
7.3.160.0150.00616.25
7.3.120.0080.00614.72
7.3.110.0050.01114.90
7.3.100.0100.00314.79
7.3.90.0060.00614.82
7.3.80.0100.00314.57
7.3.70.0050.00814.79
7.3.60.0070.00514.62
7.3.50.0020.01214.67
7.3.40.0050.00814.76
7.3.30.0030.01014.76
7.3.20.0070.00516.65
7.3.10.0100.00716.24
7.3.00.0090.00716.57
7.2.330.0100.01016.61
7.2.320.0100.01016.52
7.2.310.0100.01316.39
7.2.300.0070.01116.47
7.2.290.0120.00916.64
7.2.250.0100.00415.05
7.2.240.0060.01114.76
7.2.230.0090.00514.98
7.2.220.0050.00814.91
7.2.210.0020.01214.98
7.2.200.0060.00515.02
7.2.190.0060.00514.96
7.2.180.0060.01114.87
7.2.170.0100.00714.96
7.2.130.0140.01416.70
7.2.120.0030.01716.05
7.2.110.0210.00816.86
7.2.100.0140.00716.73
7.2.90.0140.01116.29
7.2.80.0080.01116.43
7.2.70.0260.00916.87
7.2.60.0060.01216.57
7.2.50.0170.00016.39
7.2.40.0150.00616.84
7.2.30.0150.00616.47
7.2.20.0120.00616.46
7.2.10.0100.00716.33
7.2.00.0090.00718.01
7.1.330.0070.00715.51
7.1.320.0030.00915.78
7.1.310.0090.00315.67
7.1.300.0020.00715.63
7.1.290.0090.00515.58
7.1.280.0050.00815.67
7.1.270.0030.01015.72
7.1.260.0070.00615.57
7.1.250.0090.01215.08
7.1.100.0060.00617.82
7.1.70.0000.00717.10
7.1.60.0090.01519.17
7.1.50.0110.01416.86
7.1.00.0030.03322.44
7.0.200.0390.00414.84
7.0.140.0000.07322.11
7.0.90.0070.04719.94
7.0.80.0470.06719.95
7.0.70.0500.08019.99
7.0.60.0470.04719.96
7.0.50.0400.07720.35
7.0.40.0170.07720.08
7.0.30.0070.04320.04
7.0.20.0130.08020.12
7.0.10.0100.07320.14
7.0.00.0030.04319.99
5.6.280.0000.07721.12
5.6.230.0000.07720.57
5.6.220.0100.08020.67
5.6.210.0030.06320.56
5.6.200.0100.07721.10
5.6.190.0130.08321.11
5.6.180.0030.05321.05
5.6.170.0030.08021.04
5.6.160.0070.08321.11
5.6.150.0030.06021.00
5.6.140.0100.05721.07
5.6.130.0170.07321.16
5.6.120.0030.09021.01
5.6.110.0030.08021.09
5.6.100.0130.08021.04
5.6.90.0100.07721.04
5.6.80.0030.05020.42
5.6.70.0030.07320.48
5.6.60.0030.05020.34
5.6.50.0130.07020.55
5.6.40.0030.07720.39
5.6.30.0030.05720.37
5.6.20.0070.06720.46
5.6.10.0100.07720.40
5.6.00.0030.05720.44
5.5.370.0170.05720.50
5.5.360.0100.07720.37
5.5.350.0000.07720.46
5.5.340.0070.07720.89
5.5.330.0100.04320.82
5.5.320.0130.07720.91
5.5.310.0000.09020.87
5.5.300.0100.07320.89
5.5.290.0100.04720.79
5.5.280.0070.04020.91
5.5.270.0130.07320.90
5.5.260.0130.07720.88
5.5.250.0100.08020.44
5.5.240.0000.04320.25
5.5.230.0100.04320.15
5.5.220.0100.04020.20
5.5.210.0170.05720.24
5.5.200.0100.05320.09
5.5.190.0070.04020.25
5.5.180.0030.06020.13
5.5.160.0100.07319.99
5.5.150.0130.03720.13
5.5.140.0100.07720.06
5.5.130.0100.07020.25
5.5.120.0130.07020.23
5.5.110.0030.07720.14
5.5.100.0130.07320.07
5.5.90.0100.07019.95
5.5.80.0070.08020.06
5.5.70.0070.06020.14
5.5.60.0100.07720.09
5.5.50.0070.07719.96
5.5.40.0070.07719.96
5.5.30.0100.03320.13
5.5.20.0070.07320.07
5.5.10.0030.08020.11
5.5.00.0100.07020.11
5.4.450.0100.08319.39
5.4.440.0100.06019.13
5.4.430.0070.08319.38
5.4.420.0030.08019.36
5.4.410.0070.06319.24
5.4.400.0030.07719.05
5.4.390.0070.07719.10
5.4.380.0100.05019.06
5.4.370.0100.07319.23
5.4.360.0130.07319.03
5.4.350.0070.08019.20
5.4.340.0070.04019.13
5.4.320.0170.07319.03
5.4.310.0070.08318.91
5.4.300.0000.04719.04
5.4.290.0030.07019.05
5.4.280.0100.07719.07
5.4.270.0000.08018.96
5.4.260.0100.03719.12
5.4.250.0100.08718.96
5.4.240.0100.07018.97
5.4.230.0100.06319.04
5.4.220.0130.07718.80
5.4.210.0070.07319.05
5.4.200.0030.07719.05
5.4.190.0070.04318.95
5.4.180.0030.08019.09
5.4.170.0070.05318.80
5.4.160.0100.07319.00
5.4.150.0100.05318.92
5.4.140.0000.08316.37
5.4.130.0100.03716.40
5.4.120.0030.07716.27
5.4.110.0130.06716.31
5.4.100.0070.05316.26
5.4.90.0070.05716.38
5.4.80.0200.06016.43
5.4.70.0030.08016.40
5.4.60.0030.06016.36
5.4.50.0070.07016.35
5.4.40.0070.07016.51
5.4.30.0070.05316.18
5.4.20.0000.07716.20
5.4.10.0200.06316.39
5.4.00.0070.05315.80
5.3.290.0070.06014.60
5.3.280.0100.04014.45
5.3.270.0200.06714.56
5.3.260.0100.07714.46
5.3.250.0100.07314.59
5.3.240.0030.07014.43
5.3.230.0070.07314.46
5.3.220.0070.06714.54
5.3.210.0070.07714.43
5.3.200.0100.06714.50
5.3.190.0070.04314.55
5.3.180.0070.05714.45
5.3.170.0030.07314.38
5.3.160.0170.05714.47
5.3.150.0070.07714.52
5.3.140.0030.04714.39
5.3.130.0070.05014.53
5.3.120.0170.07014.43
5.3.110.0000.07714.54
5.3.100.0070.04013.87
5.3.90.0100.07014.00
5.3.80.0000.07713.87
5.3.70.0000.07713.97
5.3.60.0070.07013.80
5.3.50.0100.04013.93
5.3.40.0070.06313.93
5.3.30.0130.06713.80
5.3.20.0070.04313.80
5.3.10.0030.06713.80
5.3.00.0000.04713.80
5.2.170.0030.06013.80
5.2.160.0070.06313.80
5.2.150.0030.06313.80
5.2.140.0030.06313.80
5.2.130.0070.06013.80
5.2.120.0070.05013.80
5.2.110.0070.06013.80
5.2.100.0100.06013.80
5.2.90.0070.03713.80
5.2.80.0000.04013.80
5.2.70.0030.03013.80
5.2.60.0070.03713.80
5.2.50.0070.03713.80
5.2.40.0030.06313.80
5.2.30.0070.06013.80
5.2.20.0070.03313.80
5.2.10.0030.05713.80
5.2.00.0130.05013.80
5.1.60.0070.05013.80
5.1.50.0070.05713.80
5.1.40.0070.05013.80
5.1.30.0030.05313.80
5.1.20.0030.05013.80
5.1.10.0030.05313.80
5.1.00.0000.03713.80
5.0.50.0030.04013.80
5.0.40.0070.02713.80
5.0.30.0030.06713.80
5.0.20.0030.04313.80
5.0.10.0030.04713.80
5.0.00.0000.05313.80
4.4.90.0030.03013.80
4.4.80.0030.03713.80
4.4.70.0030.03313.80
4.4.60.0070.02713.80
4.4.50.0000.02713.80
4.4.40.0030.03313.80
4.4.30.0100.02313.80
4.4.20.0000.03713.80
4.4.10.0030.03013.80
4.4.00.0030.05313.80
4.3.110.0000.02713.80
4.3.100.0030.03313.80
4.3.90.0070.03313.80
4.3.80.0030.05313.80
4.3.70.0000.02313.80
4.3.60.0030.03313.80
4.3.50.0130.02313.80
4.3.40.0070.04713.80
4.3.30.0030.03313.80
4.3.20.0000.03313.80
4.3.10.0000.03713.80
4.3.00.0070.03013.80

preferences:
50.04 ms | 401 KiB | 5 Q