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 puGNV
Output for 5.6.28, 7.0.20 - 7.2.0
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1453894670
Output for 7.0.6
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1463833534
Output for 7.0.5
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1459671440
Output for 7.0.4
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1457645186
Output for 7.0.3
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1458342186
Output for 7.0.2
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1458709783
Output for 7.0.1
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1458807076
Output for 7.0.0
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1459069377
Output for 5.6.21
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1462201959
Output for 5.6.20
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1460272770
Output for 5.6.19
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1457415352
Output for 5.6.18
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1458052589
Output for 5.6.17
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1458440088
Output for 5.6.16
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1459158721
Output for 5.6.15
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1459248110
Output for 5.6.14
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1460651096
Output for 5.6.13
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1460740000
Output for 5.6.12
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1461137733
Output for 5.6.11
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1461506473
Output for 5.6.10
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1461600412
Output for 5.6.9
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1461792929
Output for 5.6.8
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1461996079
Output for 5.5.35
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1463966957
Output for 5.5.34
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1460367233
Output for 5.5.33
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1457512879
Output for 5.5.32
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1458239827
Output for 5.5.31
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1458537904
Output for 5.5.30
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1459513965
Output for 5.5.29
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1460877673
Output for 5.5.28
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1461236144
Output for 5.5.27
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1461328278
Output for 5.5.26
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1461696541
Output for 5.5.25
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1461896216
Output for 5.5.24
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1464079627
Output for 5.4.45
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1453894674
Output for 5.4.44
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1453894675
Output for 5.4.42 - 5.4.43
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1453894676
Output for 5.4.41
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1453894677
Output for 5.4.38 - 5.4.40
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1453894678
Output for 5.4.36 - 5.4.37
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1453894679
Output for 5.4.34 - 5.4.35
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1453894680
Output for 5.3.29, 5.4.31 - 5.4.32
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1453894681
Output for 5.4.28 - 5.4.30
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1453894682
Output for 5.4.24 - 5.4.27
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1453894683
Output for 5.3.28, 5.4.21 - 5.4.23
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1453894684
Output for 5.4.19 - 5.4.20
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1453894685
Output for 5.3.26 - 5.3.27, 5.4.16 - 5.4.18
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1453894686
Output for 5.3.23 - 5.3.25, 5.4.13 - 5.4.15
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1453894687
Output for 5.3.22, 5.4.12
Notice: Undefined variable: Segundos in /in/rElCQ on line 7 Warning: Division by zero in /in/rElCQ on line 11 1453894688