3v4l.org

run code in 300+ PHP versions simultaneously
<?php function eho($what, $label) { echo "\n\n" . $label . ': '; dump($what); echo "\n\n"; } function dump() { $args = func_get_args(); return call_user_func_array('var_dump', $args); } function ehobool($b, $label) { eho($b ? 'true' : 'false', $label); } function CalculateRegularFenceCoords ($fCentreLat, $fCentreLon, $fRadius, $iVertices) { //$a = shell_exec( // "node $shell_scripts_path/nodejs/calculate_regular_fence.js --www_path=$source_www_path " . // "--lat=$fCentreLat --lon=$fCentreLon --radius=$fRadius --vertices=$iVertices" //); //eho($a, 'shell_exec'); $a = '{"lats":["56.998210","56.998210","56.998279","56.998414","56.998610","56.998859","56.999152","56.999478","56.999824","57.000176","57.000522","57.000848","57.001141","57.001390","57.001586","57.001721","57.001789","57.001789","57.001721","57.001586","57.001390","57.001141","57.000848","57.000522","57.000176","56.999824","56.999478","56.999152","56.998859","56.998610","56.998414","56.998279","56.998210"],"lons":["24.000324","23.999676","23.999042","23.998444","23.997906","23.997448","23.997088","23.996841","23.996714","23.996714","23.996841","23.997088","23.997448","23.997906","23.998444","23.999042","23.999676","24.000324","24.000958","24.001556","24.002094","24.002552","24.002912","24.003159","24.003286","24.003286","24.003159","24.002912","24.002552","24.002094","24.001556","24.000958","24.000324"]}'; $aFenceCoords = json_decode($a, true); foreach ($aFenceCoords['lats'] as $i => $fLat) { convert2($aFenceCoords['lats'][$i], $aFenceCoords['lons'][$i], $aFenceCoords['xes'][$i], $aFenceCoords['ys'][$i]); } return $aFenceCoords; } $actual = CalculateRegularFenceCoords(57, 24, 200, 32); unset($actual['lats'], $actual['lons'], $actual['ys']); for ($i = 0; $i <= 31; ++$i) { unset($actual['xes'][$i]); } eho($actual, '$actual'); ehobool($actual["xes"][32] == 500019.68325692, '$actual["xes"][32] == 500019.68325692'); eho($actual["xes"][32], '$actual["xes"][32]'); $actual= array( "xes"=> array( 32=> 500019.68325692 ) ); eho($actual, '$actual'); ehobool($actual["xes"][32] == 500019.68325692, '$actual["xes"][32] == 500019.68325692'); eho($actual["xes"][32], '$actual["xes"][32]');

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.0110.00418.43
8.3.50.0110.00921.92
8.3.40.0110.00418.94
8.3.30.0100.00619.11
8.3.20.0000.00720.34
8.3.10.0080.00020.69
8.3.00.0030.00719.36
8.2.180.0090.00616.63
8.2.170.0100.01022.96
8.2.160.0090.00620.53
8.2.150.0040.00424.18
8.2.140.0050.00524.66
8.2.130.0040.00426.16
8.2.120.0080.00022.23
8.2.110.0070.00322.29
8.2.100.0060.00617.97
8.2.90.0040.00717.75
8.2.80.0040.00417.97
8.2.70.0050.00317.93
8.2.60.0000.00918.16
8.2.50.0060.00318.10
8.2.40.0000.00820.59
8.2.30.0040.00419.34
8.2.20.0000.00717.84
8.2.10.0000.00818.14
8.2.00.0030.00517.86
8.1.280.0110.00725.92
8.1.270.0030.00623.96
8.1.260.0000.00826.35
8.1.250.0070.00028.09
8.1.240.0030.00619.34
8.1.230.0080.00419.21
8.1.220.0090.00017.79
8.1.210.0000.00818.77
8.1.200.0080.00017.35
8.1.190.0060.00317.23
8.1.180.0000.00818.10
8.1.170.0030.00518.65
8.1.160.0040.00422.11
8.1.150.0000.00818.95
8.1.140.0040.00417.39
8.1.130.0070.00017.78
8.1.120.0040.00417.52
8.1.110.0000.00717.46
8.1.100.0040.00417.49
8.1.90.0000.00917.41
8.1.80.0000.00717.53
8.1.70.0070.00017.46
8.1.60.0030.00617.50
8.1.50.0060.00317.58
8.1.40.0040.00417.57
8.1.30.0030.00617.70
8.1.20.0030.00517.59
8.1.10.0000.00717.65
8.1.00.0040.00417.57
8.0.300.0000.00819.73
8.0.290.0040.00416.75
8.0.280.0070.00018.48
8.0.270.0050.00317.29
8.0.260.0070.00017.29
8.0.250.0000.00717.09
8.0.240.0050.00517.07
8.0.230.0000.00717.04
8.0.220.0070.00016.85
8.0.210.0030.00316.88
8.0.200.0000.00716.93
8.0.190.0040.00417.07
8.0.180.0050.00217.02
8.0.170.0060.00316.90
8.0.160.0040.00416.83
8.0.150.0000.00716.88
8.0.140.0000.00716.94
8.0.130.0000.00613.40
8.0.120.0000.00816.99
8.0.110.0080.00016.93
8.0.100.0070.00016.97
8.0.90.0000.00717.04
8.0.80.0040.01117.00
8.0.70.0000.00716.94
8.0.60.0050.00316.93
8.0.50.0040.00417.00
8.0.30.0060.01317.21
8.0.20.0100.01117.42
8.0.10.0050.00316.99
8.0.00.0080.00916.75
7.4.330.0020.00215.00
7.4.320.0030.00316.64
7.4.300.0040.00416.66
7.4.290.0000.00716.47
7.4.280.0040.00416.44
7.4.270.0000.00716.44
7.4.260.0000.00716.59
7.4.250.0030.00516.49
7.4.240.0060.00216.59
7.4.230.0000.00716.66
7.4.220.0090.00916.56
7.4.210.0090.00916.57
7.4.200.0000.00716.52
7.4.160.0040.01216.39
7.4.150.0070.01117.40
7.4.140.0090.01017.86
7.4.130.0060.01116.71
7.4.120.0120.00716.62
7.4.110.0110.01316.45
7.4.100.0110.00816.73
7.4.90.0130.00316.52
7.4.80.0230.00419.39
7.4.70.0170.00516.61
7.4.60.0130.00616.53
7.4.50.0030.00616.63
7.4.40.0120.00616.47
7.4.30.0100.01216.60
7.4.00.0130.00614.86
7.3.330.0060.00013.25
7.3.320.0000.00613.37
7.3.310.0030.00316.49
7.3.300.0030.00316.32
7.3.290.0120.00316.30
7.3.280.0090.00716.34
7.3.270.0100.00717.40
7.3.260.0150.00316.48
7.3.250.0090.00816.42
7.3.240.0060.01216.41
7.3.230.0030.01316.39
7.3.210.0090.00916.27
7.3.200.0030.01319.39
7.3.190.0040.01516.59
7.3.180.0070.01016.50
7.3.170.0120.00616.39
7.3.160.0000.01616.38
7.3.120.0110.00714.70
7.3.110.0140.00014.78
7.3.100.0080.00614.63
7.3.90.0030.00915.04
7.3.80.0100.00714.67
7.3.70.0130.00614.50
7.3.60.0120.00315.05
7.3.50.0100.00314.95
7.3.40.0100.00714.77
7.3.30.0000.01414.88
7.3.20.0030.01016.50
7.3.10.0070.00616.69
7.3.00.0090.00616.52
7.2.330.0090.00616.78
7.2.320.0100.01616.52
7.2.310.0110.01116.76
7.2.300.0140.00316.51
7.2.290.0130.00316.86
7.2.250.0030.01315.21
7.2.240.0140.00714.93
7.2.230.0030.01414.77
7.2.220.0040.01214.93
7.2.210.0060.00914.83
7.2.200.0090.00315.11
7.2.190.0000.01615.16
7.2.180.0100.00315.11
7.2.170.0070.00415.26
7.2.160.0110.00415.30
7.2.150.0040.01216.74
7.2.140.0120.00616.67
7.2.130.0050.01116.99
7.2.120.0070.00816.89
7.2.110.0080.00416.95
7.2.100.0070.00517.00
7.2.90.0100.00716.73
7.2.80.0070.00816.95
7.2.70.0080.00716.83
7.2.60.0060.00816.72
7.2.50.0090.00917.06
7.2.40.0050.01016.69
7.2.30.0030.00916.82
7.2.20.0060.00616.99
7.2.10.0060.00617.14
7.2.00.0030.01216.85
7.1.330.0060.01215.89
7.1.320.0040.01115.96
7.1.310.0100.00315.79
7.1.300.0090.00615.79
7.1.290.0120.00315.86
7.1.280.0030.00615.61
7.1.270.0030.00615.68
7.1.260.0050.00515.82
7.1.250.0020.01115.65
7.1.200.0060.00615.89
7.1.70.0030.00316.92
7.1.60.0060.01819.61
7.1.50.0070.00717.04
7.1.00.0070.07322.36
7.0.200.0000.01016.70
7.0.140.0000.07722.22
7.0.100.0070.04719.96
7.0.90.0200.07719.95
7.0.80.0100.08019.98
7.0.70.0100.08019.93
7.0.60.0130.05320.10
7.0.50.0200.08720.39
7.0.40.0030.04320.13
7.0.30.0070.03720.05
7.0.20.0030.04720.08
7.0.10.0030.08020.04
7.0.00.0000.04720.16
5.6.280.0070.07021.11
5.6.250.0100.06720.76
5.6.240.0100.04720.61
5.6.230.0100.07720.64
5.6.220.0030.04020.68
5.6.210.0100.07720.57
5.6.200.0030.09021.06
5.6.190.0130.05721.06
5.6.180.0100.05321.02
5.6.170.0130.04021.10
5.6.160.0100.05321.08
5.6.150.0100.06321.04
5.6.140.0130.06721.12
5.6.130.0100.05721.18
5.6.120.0030.05020.96
5.6.110.0100.05721.04
5.6.100.0100.05021.14
5.6.90.0070.03720.95
5.6.80.0100.03720.38
5.6.70.0030.04320.40
5.6.60.0000.08020.48
5.6.50.0000.05720.45
5.6.40.0170.06020.45
5.6.30.0030.05720.46
5.6.20.0100.06020.39
5.6.10.0070.07720.32
5.6.00.0100.05320.29
5.5.380.0100.06720.38
5.5.370.0070.04020.36
5.5.360.0030.05020.42
5.5.350.0100.07020.43
5.5.340.0070.03720.88
5.5.330.0030.04020.80
5.5.320.0070.04320.92
5.5.310.0000.04320.92
5.5.300.0070.07720.87
5.5.290.0030.05320.91
5.5.280.0130.07320.83
5.5.270.0070.03720.88
5.5.260.0100.06720.80
5.5.250.0070.08020.76
5.5.240.0070.06020.32
5.5.230.0100.04020.19
5.5.220.0000.08020.19
5.5.210.0100.07020.24
5.5.200.0100.03320.22
5.5.190.0000.04320.26
5.5.180.0100.06320.24
5.5.160.0130.04020.00
5.5.150.0100.07320.17
5.5.140.0100.03720.11
5.5.130.0070.04320.19
5.5.120.0000.05720.24
5.5.110.0100.03320.15
5.5.100.0100.06020.11
5.5.90.0030.08020.10
5.5.80.0000.04320.12
5.5.70.0170.06720.13
5.5.60.0100.07020.07
5.5.50.0070.04020.15
5.5.40.0000.06320.14
5.5.30.0070.05020.05
5.5.20.0000.04320.10
5.5.10.0030.04020.04
5.5.00.0100.05319.96
5.4.450.0030.06019.18
5.4.440.0100.06719.27
5.4.430.0030.04019.37
5.4.420.0030.06319.20
5.4.410.0100.07319.29
5.4.400.0070.03018.90
5.4.390.0000.07319.21
5.4.380.0070.03019.03
5.4.370.0070.06719.25
5.4.360.0030.03319.19
5.4.350.0070.03319.18
5.4.340.0000.03719.14
5.4.320.0070.05319.04
5.4.310.0100.03019.18
5.4.300.0070.05019.25
5.4.290.0030.08019.13
5.4.280.0100.03318.90
5.4.270.0000.03718.90
5.4.260.0000.04318.95
5.4.250.0130.07319.05
5.4.240.0070.07719.17
5.4.230.0030.05719.02
5.4.220.0030.05319.14
5.4.210.0030.07319.02
5.4.200.0100.04019.12
5.4.190.0200.04718.89
5.4.180.0030.04018.84
5.4.170.0130.03719.03
5.4.160.0000.08319.10
5.4.150.0100.06019.19
5.4.140.0130.05016.49
5.4.130.0030.08016.19
5.4.120.0030.05716.49
5.4.110.0070.07016.57
5.4.100.0070.07316.49
5.4.90.0130.06716.39
5.4.80.0100.05716.54
5.4.70.0030.07016.51
5.4.60.0130.06016.27
5.4.50.0170.06716.39
5.4.40.0100.06316.57
5.4.30.0070.04016.25
5.4.20.0030.03716.33
5.4.10.0000.04716.34
5.4.00.0100.07015.88
5.3.290.0100.03014.66
5.3.280.0070.08014.73
5.3.270.0070.04314.75
5.3.260.0070.05014.58
5.3.250.0000.04014.69
5.3.240.0070.07714.75
5.3.230.0000.07014.61
5.3.220.0030.03314.56
5.3.210.0030.07314.57
5.3.200.0000.04014.59
5.3.190.0030.08314.73
5.3.180.0130.06714.60
5.3.170.0130.03314.55
5.3.160.0130.07014.52
5.3.150.0030.06714.57
5.3.140.0030.05714.62
5.3.130.0000.05014.63
5.3.120.0070.03714.52
5.3.110.0070.03714.71
5.3.100.0130.06014.01
5.3.90.0100.07014.03
5.3.80.0030.04014.16
5.3.70.0100.05014.10
5.3.60.0170.06714.00
5.3.50.0100.07313.95
5.3.40.0000.07714.00
5.3.30.0130.03314.06
5.3.20.0100.03713.61
5.3.10.0030.06713.78
5.3.00.0070.07013.72
5.2.170.0070.03011.16
5.2.160.0100.05711.16
5.2.150.0070.05711.04
5.2.140.0100.05711.02
5.2.130.0000.05311.12
5.2.120.0070.03311.19
5.2.110.0000.04011.11
5.2.100.0100.04711.20
5.2.90.0030.05711.02
5.2.80.0070.06011.05
5.2.70.0070.04311.23
5.2.60.0070.05711.06
5.2.50.0030.05711.10
5.2.40.0030.03010.94
5.2.30.0100.05310.88
5.2.20.0070.05311.04
5.2.10.0030.03710.99
5.2.00.0000.03310.64
5.1.60.0030.04310.13
5.1.50.0030.0279.89
5.1.40.0000.0309.98
5.1.30.0070.04710.46
5.1.20.0000.04010.28
5.1.10.0000.0379.93
5.1.00.0070.03310.07
5.0.50.0070.0279.30
5.0.40.0070.0239.30
5.0.30.0030.0379.30
5.0.20.0030.0309.30
5.0.10.0000.0209.30
5.0.00.0000.0339.30
4.4.90.0070.0339.30
4.4.80.0000.0379.30
4.4.70.0030.0339.30
4.4.60.0100.0179.30
4.4.50.0000.0339.30
4.4.40.0030.0539.30
4.4.30.0000.0209.30
4.4.20.0000.0209.30
4.4.10.0030.0139.30
4.4.00.0030.0439.30
4.3.110.0030.0209.30
4.3.100.0030.0139.30
4.3.90.0000.0209.30
4.3.80.0000.0309.30
4.3.70.0100.0279.30
4.3.60.0000.0179.30
4.3.50.0000.0339.30
4.3.40.0000.0479.30
4.3.30.0030.0109.30
4.3.20.0000.0339.30
4.3.10.0000.0279.30
4.3.00.0000.0139.30

preferences:
44.68 ms | 401 KiB | 5 Q