3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $Fecha = "2016-01-27 11:50:19"; function CalcularTiempo($Timestamp){ $Segundos = strtotime('now') - strtotime($Timestamp); return intval($Segundos); } function CalcularVelocidad($Distancia, $Tiempo){ $salida = $Distancia / $Tiempo; return $salida / 1000; } 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 $Velocidad; echo '\n'; echo float(7.6734156326455E-5); ?>
based on RbBPK
Output for 7.0.20 - 7.2.0
6.9995208171322E-5\n Fatal error: Uncaught Error: Call to undefined function float() in /in/nnSUh:32 Stack trace: #0 {main} thrown in /in/nnSUh on line 32
Process exited with code 255.
Output for 7.0.6
1.2025280523417E-8\n Fatal error: Uncaught Error: Call to undefined function float() in /in/nnSUh:32 Stack trace: #0 {main} thrown in /in/nnSUh on line 32
Process exited with code 255.
Output for 7.0.5
2.0685090084166E-8\n Fatal error: Uncaught Error: Call to undefined function float() in /in/nnSUh:32 Stack trace: #0 {main} thrown in /in/nnSUh on line 32
Process exited with code 255.
Output for 7.0.4
3.185197026465E-8\n Fatal error: Uncaught Error: Call to undefined function float() in /in/nnSUh:32 Stack trace: #0 {main} thrown in /in/nnSUh on line 32
Process exited with code 255.
Output for 7.0.3
2.6863421419139E-8\n Fatal error: Uncaught Error: Call to undefined function float() in /in/nnSUh:32 Stack trace: #0 {main} thrown in /in/nnSUh on line 32
Process exited with code 255.
Output for 7.0.2
2.4813814236628E-8\n Fatal error: Uncaught Error: Call to undefined function float() in /in/nnSUh:32 Stack trace: #0 {main} thrown in /in/nnSUh on line 32
Process exited with code 255.
Output for 7.0.1
2.4322641615767E-8\n Fatal error: Uncaught Error: Call to undefined function float() in /in/nnSUh:32 Stack trace: #0 {main} thrown in /in/nnSUh on line 32
Process exited with code 255.
Output for 7.0.0
2.3090431137793E-8\n Fatal error: Uncaught Error: Call to undefined function float() in /in/nnSUh:32 Stack trace: #0 {main} thrown in /in/nnSUh on line 32
Process exited with code 255.
Output for 5.6.28
6.9995208171322E-5\n Fatal error: Call to undefined function float() in /in/nnSUh on line 32
Process exited with code 255.
Output for 5.6.21
1.4386271548589E-8\n Fatal error: Call to undefined function float() in /in/nnSUh on line 32
Process exited with code 255.
Output for 5.6.20
1.8735759833087E-8\n Fatal error: Call to undefined function float() in /in/nnSUh on line 32
Process exited with code 255.
Output for 5.6.19
3.3929615792774E-8\n Fatal error: Call to undefined function float() in /in/nnSUh on line 32
Process exited with code 255.
Output for 5.6.18
2.8733167872364E-8\n Fatal error: Call to undefined function float() in /in/nnSUh on line 32
Process exited with code 255.
Output for 5.6.17
2.6285181990871E-8\n Fatal error: Call to undefined function float() in /in/nnSUh on line 32
Process exited with code 255.
Output for 5.6.16
2.2698693246604E-8\n Fatal error: Call to undefined function float() in /in/nnSUh on line 32
Process exited with code 255.
Output for 5.6.15
2.2319879729622E-8\n Fatal error: Call to undefined function float() in /in/nnSUh on line 32
Process exited with code 255.
Output for 5.6.14
1.7687102896042E-8\n Fatal error: Call to undefined function float() in /in/nnSUh on line 32
Process exited with code 255.
Output for 5.6.13
1.7457475965724E-8\n Fatal error: Call to undefined function float() in /in/nnSUh on line 32
Process exited with code 255.
Output for 5.6.12
1.64992225343E-8\n Fatal error: Call to undefined function float() in /in/nnSUh on line 32
Process exited with code 255.
Output for 5.6.11
1.5700246020185E-8\n Fatal error: Call to undefined function float() in /in/nnSUh on line 32
Process exited with code 255.
Output for 5.6.10
1.5508918375631E-8\n Fatal error: Call to undefined function float() in /in/nnSUh on line 32
Process exited with code 255.
Output for 5.6.9
1.5131030526706E-8\n Fatal error: Call to undefined function float() in /in/nnSUh on line 32
Process exited with code 255.
Output for 5.6.8
1.4751739649337E-8\n Fatal error: Call to undefined function float() in /in/nnSUh on line 32
Process exited with code 255.
Output for 5.5.35
1.1866054434201E-8\n Fatal error: Call to undefined function float() in /in/nnSUh on line 32
Process exited with code 255.
Output for 5.5.34
1.8462443213077E-8\n Fatal error: Call to undefined function float() in /in/nnSUh on line 32
Process exited with code 255.
Output for 5.5.33
3.301578701112E-8\n Fatal error: Call to undefined function float() in /in/nnSUh on line 32
Process exited with code 255.
Output for 5.5.32
2.7495824069099E-8\n Fatal error: Call to undefined function float() in /in/nnSUh on line 32
Process exited with code 255.
Output for 5.5.31
2.5731787703947E-8\n Fatal error: Call to undefined function float() in /in/nnSUh on line 32
Process exited with code 255.
Output for 5.5.30
2.126447546407E-8\n Fatal error: Call to undefined function float() in /in/nnSUh on line 32
Process exited with code 255.
Output for 5.5.29
1.7113434157669E-8\n Fatal error: Call to undefined function float() in /in/nnSUh on line 32
Process exited with code 255.
Output for 5.5.28
1.6278141566433E-8\n Fatal error: Call to undefined function float() in /in/nnSUh on line 32
Process exited with code 255.
Output for 5.5.27
1.6076461144788E-8\n Fatal error: Call to undefined function float() in /in/nnSUh on line 32
Process exited with code 255.
Output for 5.5.26
1.531789636862E-8\n Fatal error: Call to undefined function float() in /in/nnSUh on line 32
Process exited with code 255.
Output for 5.5.25
1.4935782800738E-8\n Fatal error: Call to undefined function float() in /in/nnSUh on line 32
Process exited with code 255.
Output for 5.5.24
1.1734800822731E-8\n Fatal error: Call to undefined function float() in /in/nnSUh on line 32
Process exited with code 255.
Output for 5.4.45
6.9790902251382E-5\n Fatal error: Call to undefined function float() in /in/nnSUh on line 32
Process exited with code 255.
Output for 5.4.44
6.9750184105378E-5\n Fatal error: Call to undefined function float() in /in/nnSUh on line 32
Process exited with code 255.
Output for 5.4.43
6.9709513444092E-5\n Fatal error: Call to undefined function float() in /in/nnSUh on line 32
Process exited with code 255.
Output for 5.4.41 - 5.4.42
6.9668890184509E-5\n Fatal error: Call to undefined function float() in /in/nnSUh on line 32
Process exited with code 255.
Output for 5.4.40
6.9628314243807E-5\n Fatal error: Call to undefined function float() in /in/nnSUh on line 32
Process exited with code 255.
Output for 5.4.39
6.9587785539358E-5\n Fatal error: Call to undefined function float() in /in/nnSUh on line 32
Process exited with code 255.
Output for 5.4.37 - 5.4.38
6.9547303988724E-5\n Fatal error: Call to undefined function float() in /in/nnSUh on line 32
Process exited with code 255.
Output for 5.4.34 - 5.4.36
6.9506869509661E-5\n Fatal error: Call to undefined function float() in /in/nnSUh on line 32
Process exited with code 255.
Output for 5.3.29, 5.4.32
6.9466482020115E-5\n Fatal error: Call to undefined function float() in /in/nnSUh on line 32
Process exited with code 255.
Output for 5.4.29 - 5.4.31
6.9426141438221E-5\n Fatal error: Call to undefined function float() in /in/nnSUh on line 32
Process exited with code 255.
Output for 5.4.25 - 5.4.28
6.9385847682308E-5\n Fatal error: Call to undefined function float() in /in/nnSUh on line 32
Process exited with code 255.
Output for 5.3.28, 5.4.22 - 5.4.24
6.9345600670892E-5\n Fatal error: Call to undefined function float() in /in/nnSUh on line 32
Process exited with code 255.
Output for 5.4.19 - 5.4.21
6.9305400322677E-5\n Fatal error: Call to undefined function float() in /in/nnSUh on line 32
Process exited with code 255.
Output for 5.3.26 - 5.3.27, 5.4.15 - 5.4.18
6.9265246556557E-5\n Fatal error: Call to undefined function float() in /in/nnSUh on line 32
Process exited with code 255.
Output for 5.3.23 - 5.3.25, 5.4.13 - 5.4.14
6.9225139291614E-5\n Fatal error: Call to undefined function float() in /in/nnSUh on line 32
Process exited with code 255.
Output for 5.3.22, 5.4.12
6.9185078447116E-5\n Fatal error: Call to undefined function float() in /in/nnSUh on line 32
Process exited with code 255.