3v4l.org

run code in 500+ PHP versions simultaneously
<?php $name= 'TEST'; $circleLat = 19.282494; $circleLon = 166.636650; $circleRadius = 1047*1852; $circlePrecision =5; $coordinatesList = ""; // Code based on Google Earth community posting by 'ink_polaroid' // http://bbs.keyhole.com/ubb/showflat.php/Cat/0/Number/23634/an//page//vc/1 $num_points = 36; $delta_pts = 360/$num_points; // convert coordinates to radians $lat = deg2rad(floatval($circleLat)); $lon = deg2rad(floatval($circleLon)); $d = $circleRadius; $d_rad = $d/6378137; // convert dist to angular distance in radians // loop around the compass, appending coordinates of each vertex for($i=0; $i<=$num_points; $i++) { $radial = deg2rad($i*$delta_pts); $lonCircle = $d_rad*sin($radial); $latCircle = $d_rad*cos($radial); $coordinatesList .= Round(rad2deg($lon+$lonCircle),$circlePrecision).",". Round(rad2deg($lat+$latCircle),$circlePrecision).",30\n"; } print_r($coordinatesList);

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.5.80.0050.00416.82
8.5.70.0080.01016.79
8.5.60.0110.00716.87
8.5.50.0120.00616.81
8.5.30.0060.01119.88
8.5.20.0060.00420.21
8.5.10.0090.01116.85
8.5.00.0080.01420.33
8.4.230.0040.00519.88
8.4.220.0060.00219.61
8.4.210.0080.00919.78
8.4.180.0140.01222.31
8.4.170.0110.01020.49
8.4.160.0110.00924.12
8.4.150.0080.00416.94
8.4.140.0190.00717.64
8.4.130.0110.00618.29
8.4.120.0050.00320.98
8.4.110.0110.00924.54
8.4.100.0110.00718.27
8.4.90.0150.00618.11
8.4.80.0050.00317.98
8.4.70.0130.00417.99
8.4.60.0120.00917.63
8.4.50.0090.01119.31
8.4.40.0130.00717.86
8.4.30.0170.00319.26
8.4.20.0100.01019.68
8.4.10.0090.00619.77
8.3.320.0120.00718.76
8.3.310.0130.00718.50
8.3.300.0140.00720.93
8.3.290.0100.01221.04
8.3.280.0140.00618.66
8.3.270.0140.00717.09
8.3.260.0110.00816.99
8.3.250.0140.00419.22
8.3.240.0080.01117.07
8.3.230.0110.00817.00
8.3.220.0110.00817.49
8.3.210.0090.00817.09
8.3.200.0130.00616.93
8.3.190.0090.01217.56
8.3.180.0070.01217.60
8.3.170.0090.00921.32
8.3.160.0090.00917.69
8.3.150.0040.00417.75
8.3.140.0060.00317.35
8.3.130.0060.00316.91
8.3.120.0140.00321.35
8.3.110.0040.00418.75
8.3.100.0110.00617.00
8.3.90.0100.00726.77
8.3.80.0060.00318.68
8.3.70.0130.00316.88
8.3.60.0060.00918.59
8.3.50.0090.00916.93
8.3.40.0170.00322.41
8.3.30.0070.00720.36
8.3.20.0070.01425.66
8.3.10.0100.01025.66
8.3.00.0160.00325.66
8.2.320.0140.00918.36
8.2.310.0100.00918.36
8.2.300.0120.01022.43
8.2.290.0050.00520.67
8.2.280.0100.00916.93
8.2.270.0030.01521.09
8.2.260.0090.00918.94
8.2.250.0000.00817.77
8.2.240.0040.01517.58
8.2.230.0030.00620.94
8.2.220.0110.00024.06
8.2.210.0090.00926.77
8.2.200.0060.00616.88
8.2.190.0080.00617.13
8.2.180.0180.00416.75
8.2.170.0150.00319.20
8.2.160.0030.01022.96
8.2.150.0160.00325.66
8.2.140.0110.00725.66
8.2.130.0070.01125.66
8.2.120.0030.01625.66
8.2.110.0130.00725.66
8.2.100.0170.00325.66
8.2.90.0130.00625.66
8.2.80.0040.01125.66
8.2.70.0160.00025.66
8.2.60.0100.00725.66
8.2.50.0090.00625.66
8.2.40.0040.01125.66
8.2.30.0030.01325.66
8.2.20.0120.00625.66
8.2.10.0150.00425.66
8.2.00.0150.00325.66
8.1.340.0120.01017.89
8.1.330.0140.00516.99
8.1.320.0120.00716.53
8.1.310.0130.00318.81
8.1.300.0060.00316.72
8.1.290.0060.00330.84
8.1.280.0170.00325.92
8.1.270.0130.00325.66
8.1.260.0100.00725.66
8.1.250.0070.01125.66
8.1.240.0060.01025.66
8.1.230.0170.00325.66
8.1.220.0110.00425.66
8.1.210.0060.00925.66
8.1.200.0140.00425.66
8.1.190.0060.01025.66
8.1.180.0100.00725.66
8.1.170.0130.00325.66
8.1.160.0100.01025.66
8.1.150.0150.00025.66
8.1.140.0100.00725.66
8.1.130.0090.00625.66
8.1.120.0060.00925.66
8.1.110.0110.00425.66
8.1.100.0120.00325.66
8.1.90.0110.00425.66
8.1.80.0120.00325.66
8.1.70.0100.00625.66
8.1.60.0120.00325.66
8.1.50.0110.00425.66
8.1.40.0100.00625.66
8.1.30.0000.01625.66
8.1.20.0120.00325.66
8.1.10.0040.01125.66
8.1.00.0120.00325.66

preferences:
51.05 ms | 1137 KiB | 5 Q