3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $Fecha = "2016-01-27 12:05:19"; function CalcularTiempo($Timestamp){ $Segundos = 1453894620 - 1453894620; return intval($Segundos); } function CalcularVelocidad($Distancia, $Tiempo){ $Velocidad = $Distancia / $Tiempo; $Velocidad = $Velocidad * 3.6; return $Velocidad; } 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 strtotime('now'); ?>
based on OUH9M
Output for 5.6.28, 7.0.20 - 7.2.0
Warning: Division by zero in /in/puGNV on line 11 1453894654
Output for 7.0.6
Warning: Division by zero in /in/puGNV on line 11 1463833530
Output for 7.0.5
Warning: Division by zero in /in/puGNV on line 11 1459671436
Output for 7.0.4
Warning: Division by zero in /in/puGNV on line 11 1457645186
Output for 7.0.3
Warning: Division by zero in /in/puGNV on line 11 1458342186
Output for 7.0.2
Warning: Division by zero in /in/puGNV on line 11 1458709782
Output for 7.0.1
Warning: Division by zero in /in/puGNV on line 11 1458807075
Output for 7.0.0
Warning: Division by zero in /in/puGNV on line 11 1459069376
Output for 5.6.21
Warning: Division by zero in /in/puGNV on line 11 1462201955
Output for 5.6.20
Warning: Division by zero in /in/puGNV on line 11 1460272766
Output for 5.6.19
Warning: Division by zero in /in/puGNV on line 11 1457415352
Output for 5.6.18
Warning: Division by zero in /in/puGNV on line 11 1458052588
Output for 5.6.17
Warning: Division by zero in /in/puGNV on line 11 1458440088
Output for 5.6.16
Warning: Division by zero in /in/puGNV on line 11 1459158720
Output for 5.6.15
Warning: Division by zero in /in/puGNV on line 11 1459248115
Output for 5.6.14
Warning: Division by zero in /in/puGNV on line 11 1460651088
Output for 5.6.13
Warning: Division by zero in /in/puGNV on line 11 1460739996
Output for 5.6.12
Warning: Division by zero in /in/puGNV on line 11 1461137728
Output for 5.6.11
Warning: Division by zero in /in/puGNV on line 11 1461506468
Output for 5.6.10
Warning: Division by zero in /in/puGNV on line 11 1461600408
Output for 5.6.9
Warning: Division by zero in /in/puGNV on line 11 1461792925
Output for 5.6.8
Warning: Division by zero in /in/puGNV on line 11 1461996075
Output for 5.5.35
Warning: Division by zero in /in/puGNV on line 11 1463966943
Output for 5.5.34
Warning: Division by zero in /in/puGNV on line 11 1460367229
Output for 5.5.33
Warning: Division by zero in /in/puGNV on line 11 1457512878
Output for 5.5.32
Warning: Division by zero in /in/puGNV on line 11 1458239826
Output for 5.5.31
Warning: Division by zero in /in/puGNV on line 11 1458537904
Output for 5.5.30
Warning: Division by zero in /in/puGNV on line 11 1459513961
Output for 5.5.29
Warning: Division by zero in /in/puGNV on line 11 1460877668
Output for 5.5.28
Warning: Division by zero in /in/puGNV on line 11 1461236139
Output for 5.5.27
Warning: Division by zero in /in/puGNV on line 11 1461328273
Output for 5.5.26
Warning: Division by zero in /in/puGNV on line 11 1461696537
Output for 5.5.25
Warning: Division by zero in /in/puGNV on line 11 1461896212
Output for 5.5.24
Warning: Division by zero in /in/puGNV on line 11 1464079624
Output for 5.4.45
Warning: Division by zero in /in/puGNV on line 11 1453894658
Output for 5.4.44
Warning: Division by zero in /in/puGNV on line 11 1453894659
Output for 5.4.42 - 5.4.43
Warning: Division by zero in /in/puGNV on line 11 1453894660
Output for 5.4.41
Warning: Division by zero in /in/puGNV on line 11 1453894661
Output for 5.4.40
Warning: Division by zero in /in/puGNV on line 11 1453894662
Output for 5.4.39
Warning: Division by zero in /in/puGNV on line 11 1453894663
Output for 5.4.37 - 5.4.38
Warning: Division by zero in /in/puGNV on line 11 1453894664
Output for 5.4.36
Warning: Division by zero in /in/puGNV on line 11 1453894665
Output for 5.4.34 - 5.4.35
Warning: Division by zero in /in/puGNV on line 11 1453894666
Output for 5.3.29, 5.4.31 - 5.4.32
Warning: Division by zero in /in/puGNV on line 11 1453894667
Output for 5.4.27 - 5.4.30
Warning: Division by zero in /in/puGNV on line 11 1453894668
Output for 5.4.23 - 5.4.26
Warning: Division by zero in /in/puGNV on line 11 1453894669
Output for 5.3.28, 5.4.21 - 5.4.22
Warning: Division by zero in /in/puGNV on line 11 1453894670
Output for 5.4.19 - 5.4.20
Warning: Division by zero in /in/puGNV on line 11 1453894671
Output for 5.3.26 - 5.3.27, 5.4.17 - 5.4.18
Warning: Division by zero in /in/puGNV on line 11 1453894672
Output for 5.3.24 - 5.3.25, 5.4.14 - 5.4.16
Warning: Division by zero in /in/puGNV on line 11 1453894673
Output for 5.3.22 - 5.3.23, 5.4.12 - 5.4.13
Warning: Division by zero in /in/puGNV on line 11 1453894674