3v4l.org

run code in 300+ PHP versions simultaneously
<?php $Fecha = "2016-01-27 11:34:19"; function CalcularTiempo($Timestamp){ $Segundos = strtotime('now') - strtotime($Timestamp); return intval($Segundos); } function CalcularVelocidad($Distancia, $Tiempo){ return $Distancia / $Tiempo; } function CalcularDistancia($OrigenLat, $OrigenLon, $DestinoLat, $DestinoLon){ $R = 6371; $dLat = ($DestinoLat - $OrigenLat) * (pi() / 180); $dLon = ($DestinoLon - $OrigenLon) * (pi() / 180); $a = sin($dLat / 2) * sin($dLat / 2) + cos($OrigenLat * (pi() / 180)) * cos($DestinoLat * (pi() / 180)) * sin($dLon / 2) * sin($dLon / 2); $c = 2 * atan2(sqrt($a), sqrt(1 - $a)); return ($R * $c) * 1000; } $Tiempo = CalcularTiempo($Fecha); $Distancia = CalcularDistancia(38.278096798610605,-0.6911851008339024,38.2788421664234,-0.6901980479164007); $Velocidad = CalcularVelocidad($Distancia, $Tiempo); echo $Tiempo; ?>

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.70.0120.00616.98
8.3.60.0100.01018.48
8.3.50.0120.01022.22
8.3.40.0090.00919.38
8.3.30.0110.00419.20
8.3.20.0000.00820.84
8.3.10.0040.00421.03
8.3.00.0100.00020.97
8.2.180.0070.01018.62
8.2.170.0090.00622.96
8.2.160.0090.00622.54
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0000.01121.37
8.2.120.0050.00326.35
8.2.110.0070.00321.41
8.2.100.0060.00918.12
8.2.90.0030.00619.61
8.2.80.0050.00318.13
8.2.70.0080.00018.12
8.2.60.0040.00418.30
8.2.50.0070.00318.25
8.2.40.0030.00621.20
8.2.30.0030.00719.88
8.2.20.0040.00418.25
8.2.10.0040.00418.57
8.2.00.0000.00718.54
8.1.280.0070.00725.92
8.1.270.0100.01024.29
8.1.260.0050.00328.09
8.1.250.0000.00828.09
8.1.240.0040.00423.25
8.1.230.0080.00421.49
8.1.220.0040.00418.29
8.1.210.0060.00318.77
8.1.200.0000.00917.85
8.1.190.0040.00417.75
8.1.180.0040.00418.10
8.1.170.0040.00419.16
8.1.160.0040.00421.15
8.1.150.0040.00419.29
8.1.140.0060.00319.92
8.1.130.0030.00318.22
8.1.120.0040.00418.13
8.1.110.0030.00517.91
8.1.100.0050.00317.91
8.1.90.0000.00718.05
8.1.80.0040.00417.98
8.1.70.0050.00218.10
8.1.60.0000.00818.16
8.1.50.0040.00418.11
8.1.40.0110.00018.16
8.1.30.0030.00618.09
8.1.20.0000.00718.01
8.1.10.0040.00418.00
8.1.00.0060.00318.05
8.0.300.0040.00418.77
8.0.290.0000.00817.13
8.0.280.0000.00718.85
8.0.270.0030.00317.74
8.0.260.0000.00817.75
8.0.250.0040.00417.56
8.0.240.0040.00417.61
8.0.230.0040.00417.64
8.0.220.0050.00317.59
8.0.210.0040.00417.43
8.0.200.0000.00717.51
8.0.190.0000.00817.64
8.0.180.0030.00517.53
8.0.170.0050.00517.52
8.0.160.0030.00317.48
8.0.150.0030.00317.54
8.0.140.0040.00417.33
8.0.130.0050.00013.84
8.0.120.0040.00417.33
8.0.110.0040.00417.48
8.0.100.0030.00317.36
8.0.90.0050.00317.30
8.0.80.0070.01117.33
8.0.70.0040.00417.38
8.0.60.0040.00417.43
8.0.50.0070.00017.27
8.0.30.0120.00717.54
8.0.20.0130.00717.48
8.0.10.0040.00417.49
8.0.00.0110.00717.16
7.4.330.0050.00017.18
7.4.320.0070.00017.16
7.4.300.0070.00017.16
7.4.290.0080.00016.94
7.4.280.0050.00317.16
7.4.270.0030.00316.96
7.4.260.0050.00317.18
7.4.250.0000.00716.96
7.4.240.0040.00317.10
7.4.230.0000.00716.98
7.4.220.0060.01217.08
7.4.210.0070.01016.84
7.4.200.0040.00417.17
7.4.160.0060.01116.94
7.4.150.0030.01417.40
7.4.140.0110.00817.86
7.4.130.0120.00716.78
7.4.120.0080.01116.83
7.4.110.0070.01016.94
7.4.100.0070.01116.94
7.4.90.0030.01317.00
7.4.80.0120.00819.39
7.4.70.0070.01016.98
7.4.60.0030.01416.87
7.4.50.0090.00616.86
7.4.40.0100.00716.97
7.4.30.0060.01216.75
7.4.10.0020.01415.58
7.4.00.0030.01415.63
7.3.330.0000.00613.84
7.3.320.0070.00013.78
7.3.310.0030.00317.04
7.3.300.0070.00016.98
7.3.290.0050.01116.70
7.3.280.0090.00916.67
7.3.270.0090.00917.40
7.3.260.0130.00416.97
7.3.250.0090.01116.79
7.3.240.0100.00716.96
7.3.230.0100.00616.93
7.3.210.0110.01117.07
7.3.200.0030.01416.74
7.3.190.0110.00516.81
7.3.180.0110.00416.89
7.3.170.0130.00416.70
7.3.160.0060.01016.79
7.3.130.0070.01015.53
7.3.120.0100.00715.86
7.3.110.0050.01316.00
7.3.100.0050.00815.72
7.3.90.0070.00715.95
7.3.80.0050.00815.84
7.3.70.0050.00815.94
7.3.60.0040.00815.95
7.3.50.0080.00716.01
7.3.40.0060.00815.87
7.3.30.0050.00715.95
7.3.20.0050.00817.22
7.3.10.0050.00817.23
7.3.00.0040.00917.23
7.2.330.0090.00917.21
7.2.320.0160.00717.19
7.2.310.0060.01117.19
7.2.300.0070.01416.88
7.2.290.0100.01316.92
7.2.260.0100.00815.35
7.2.250.0110.00815.70
7.2.240.0070.01016.07
7.2.230.0080.00715.99
7.2.220.0070.00715.89
7.2.210.0060.00815.96
7.2.200.0020.01016.04
7.2.190.0060.00916.03
7.2.180.0040.00815.94
7.2.170.0060.00816.04
7.2.160.0050.00816.01
7.2.150.0050.01017.34
7.2.140.0060.00617.51
7.2.130.0050.00817.49
7.2.120.0080.00517.56
7.2.110.0070.00817.37
7.2.100.0080.00417.47
7.2.90.0040.00817.32
7.2.80.0060.00617.56
7.2.70.0060.00617.40
7.2.60.0060.00717.36
7.2.50.0050.00917.50
7.2.40.0070.00617.47
7.2.30.0070.00817.27
7.2.20.0070.00517.50
7.2.10.0090.00517.37
7.2.00.0050.00917.81
7.1.330.0070.00816.60
7.1.320.0080.00616.60
7.1.310.0060.00916.64
7.1.300.0040.01016.65
7.1.290.0090.00516.63
7.1.280.0080.00616.69
7.1.270.0060.00616.62
7.1.260.0060.00516.69
7.1.250.0030.00916.51
7.1.240.0060.00816.34
7.1.230.0060.00716.57
7.1.220.0070.00716.41
7.1.210.0060.00916.36
7.1.200.0040.00716.34
7.1.190.0050.00916.16
7.1.180.0090.00316.27
7.1.170.0050.00516.54
7.1.160.0080.00516.56
7.1.150.0040.00916.30
7.1.140.0070.00716.38
7.1.130.0070.00716.54
7.1.120.0020.01216.42
7.1.110.0030.01416.38
7.1.100.0040.00916.93
7.1.90.0050.00516.38
7.1.80.0030.01016.30
7.1.70.0050.00916.80
7.1.60.0030.01417.44
7.1.50.0070.00716.88
7.1.40.0090.00316.26
7.1.30.0040.00816.28
7.1.20.0090.00516.44
7.1.10.0070.00416.45
7.1.00.0020.03218.39
7.0.330.0080.00515.83
7.0.320.0050.00715.79
7.0.310.0050.00716.20
7.0.300.0050.00715.97
7.0.290.0060.00616.00
7.0.280.0060.00716.13
7.0.270.0060.00615.88
7.0.260.0040.01115.80
7.0.250.0060.00816.00
7.0.240.0060.00816.00
7.0.230.0050.00616.17
7.0.220.0030.00915.96
7.0.210.0070.00515.89
7.0.200.0200.00815.68
7.0.190.0090.00316.11
7.0.180.0090.00515.95
7.0.170.0070.00716.20
7.0.160.0020.00915.97
7.0.150.0020.01115.95
7.0.140.0030.00615.89
7.0.130.0020.01216.18
7.0.120.0050.00715.88
7.0.110.0060.00615.97
7.0.100.0060.01016.00
7.0.90.0100.00516.11
7.0.80.0080.00716.10
7.0.70.0110.00216.03
7.0.60.0070.03117.95
7.0.50.0050.01816.75
7.0.40.0090.03016.11
7.0.30.0110.02116.16
7.0.20.0130.03316.16
7.0.10.0090.01616.16
7.0.00.0040.03416.27
5.6.400.0110.00514.85
5.6.390.0070.00614.95
5.6.380.0030.01314.75
5.6.370.0050.00914.85
5.6.360.0100.00414.68
5.6.350.0070.00714.94
5.6.340.0020.00914.63
5.6.330.0050.00714.63
5.6.320.0060.00514.88
5.6.310.0080.00815.14
5.6.300.0050.00915.16
5.6.290.0000.00914.83
5.6.280.0020.02017.18
5.6.270.0050.01115.06
5.6.260.0070.00814.96
5.6.250.0060.00814.92
5.6.240.0080.00814.92
5.6.230.0090.00614.86
5.6.220.0050.00814.57
5.6.210.0070.03016.85
5.6.200.0040.02716.07
5.6.190.0030.02516.88
5.6.180.0140.02916.86
5.6.170.0180.02716.85
5.6.160.0070.01816.87
5.6.150.0050.01916.13
5.6.140.0090.02915.97
5.6.130.0030.03316.18
5.6.120.0020.03917.03
5.6.110.0060.01917.15
5.6.100.0080.02716.98
5.6.90.0080.02716.92
5.6.80.0040.01916.81
5.6.70.0060.00614.60
5.6.60.0050.00814.93
5.6.50.0090.00314.95
5.6.40.0020.01214.81
5.6.30.0080.00514.64
5.6.20.0100.00514.67
5.6.10.0030.00814.71
5.6.00.0060.00814.95
5.5.380.0080.00714.83
5.5.370.0030.01015.04
5.5.360.0060.00814.84
5.5.350.1330.01916.81
5.5.340.0050.02015.98
5.5.330.0050.01616.53
5.5.320.0130.02216.79
5.5.310.0180.02416.74
5.5.300.0030.01815.89
5.5.290.0030.02016.05
5.5.280.0080.01917.01
5.5.270.0060.01816.75
5.5.260.0080.03016.90
5.5.250.0030.03516.78
5.5.240.0050.03316.51
5.5.230.0040.01114.85
5.5.220.0060.01114.61
5.5.210.0050.00914.69
5.5.200.0050.00814.73
5.5.190.0100.00714.82
5.5.180.0020.01014.79
5.5.170.0090.00514.68
5.5.160.0090.00414.44
5.5.150.0090.00714.75
5.5.140.0030.01014.86
5.5.130.0080.00614.81
5.5.120.0060.00914.56
5.5.110.0080.00514.51
5.5.100.0100.00514.98
5.5.90.0090.00514.81
5.5.80.0070.01114.92
5.5.70.0050.00914.99
5.5.60.0100.00514.93
5.5.50.0060.00814.71
5.5.40.0050.00814.68
5.5.30.0070.00514.48
5.5.20.0080.00314.90
5.5.10.0030.00914.46
5.5.00.0030.01014.92

preferences:
52.36 ms | 401 KiB | 5 Q