3v4l.org

run code in 300+ PHP versions simultaneously
<?php $Fecha = 1453892442; 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 $Velocidad; ?>

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.0140.00718.68
8.3.50.0180.00322.24
8.3.40.0040.01119.38
8.3.30.0040.01119.35
8.3.20.0040.00420.74
8.3.10.0000.00821.23
8.3.00.0080.00021.06
8.2.180.0160.00317.00
8.2.170.0060.00922.96
8.2.160.0140.00319.84
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0040.00421.32
8.2.120.0000.00826.35
8.2.110.0070.00321.41
8.2.100.0040.00818.41
8.2.90.0030.00618.53
8.2.80.0000.00918.53
8.2.70.0080.00018.25
8.2.60.0000.00818.38
8.2.50.0040.00418.25
8.2.40.0000.00820.16
8.2.30.0030.00619.88
8.2.20.0000.00818.30
8.2.10.0000.00718.57
8.2.00.0000.01018.57
8.1.280.0100.00625.92
8.1.270.0090.00924.21
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0060.00324.20
8.1.230.0080.00322.95
8.1.220.0050.00318.41
8.1.210.0040.00419.43
8.1.200.0060.00317.85
8.1.190.0040.00417.97
8.1.180.0030.00618.10
8.1.170.0000.00819.63
8.1.160.0070.00021.17
8.1.150.0000.00919.51
8.1.140.0050.00319.97
8.1.130.0000.00718.12
8.1.120.0000.00718.09
8.1.110.0040.00418.00
8.1.100.0040.00418.08
8.1.90.0040.00417.97
8.1.80.0040.00418.04
8.1.70.0050.00318.00
8.1.60.0000.00818.15
8.1.50.0060.00318.14
8.1.40.0030.00617.98
8.1.30.0050.00318.26
8.1.20.0060.00318.16
8.1.10.0040.00418.16
8.1.00.0060.00318.02
8.0.300.0040.00420.48
8.0.290.0000.00817.63
8.0.280.0070.00018.95
8.0.270.0030.00317.72
8.0.260.0000.00617.68
8.0.250.0000.00717.67
8.0.240.0000.00717.46
8.0.230.0070.00017.49
8.0.220.0030.00317.55
8.0.210.0040.00417.64
8.0.200.0000.00617.54
8.0.190.0000.00817.53
8.0.180.0040.00417.54
8.0.170.0060.00317.52
8.0.160.0000.00817.39
8.0.150.0070.00017.49
8.0.140.0030.00617.29
8.0.130.0030.00313.93
8.0.120.0050.00317.49
8.0.110.0000.00817.54
8.0.100.0000.00717.48
8.0.90.0040.00417.46
8.0.80.0060.01517.25
8.0.70.0000.00717.68
8.0.60.0040.00417.37
8.0.50.0000.00717.55
8.0.30.0140.00517.34
8.0.20.0100.00917.59
8.0.10.0080.00017.69
8.0.00.0080.01217.31
7.4.330.0020.00217.13
7.4.320.0030.00317.13
7.4.300.0000.00617.11
7.4.290.0000.00717.21
7.4.280.0030.00617.18
7.4.270.0000.00717.09
7.4.260.0050.00317.20
7.4.250.0000.00717.07
7.4.240.0000.00717.09
7.4.230.0070.00017.21
7.4.220.0040.01516.92
7.4.210.0070.00716.89
7.4.200.0030.00316.96
7.4.160.0100.00616.81
7.4.150.0150.00317.40
7.4.140.0080.01117.86
7.4.130.0060.01617.02
7.4.120.0150.00616.94
7.4.110.0100.00717.03
7.4.100.0160.00616.83
7.4.90.0070.01017.03
7.4.80.0110.01419.39
7.4.70.0130.00316.91
7.4.60.0090.00917.07
7.4.50.0090.00616.82
7.4.40.0040.01716.71
7.4.30.0100.00716.70
7.4.00.0050.01115.56
7.3.330.0000.00613.76
7.3.320.0030.00313.97
7.3.310.0070.00017.03
7.3.300.0000.00616.98
7.3.290.0110.00316.69
7.3.280.0080.01116.73
7.3.270.0100.00717.40
7.3.260.0060.01216.79
7.3.240.0070.01317.05
7.3.230.0030.01417.00
7.3.210.0030.01317.07
7.3.200.0060.01216.96
7.3.190.0120.00417.01
7.3.180.0060.00916.90
7.3.170.0100.00716.99
7.3.160.0130.00316.89
7.3.120.0180.00015.44
7.3.110.0030.01315.53
7.3.100.0070.01315.63
7.3.90.0030.01315.64
7.3.80.0000.01515.50
7.3.70.0060.01015.53
7.3.60.0060.00615.13
7.3.50.0070.00715.65
7.3.40.0110.00615.23
7.3.30.0000.01215.60
7.3.20.0080.00417.21
7.3.10.0060.00717.42
7.3.00.0010.01117.36
7.2.330.0140.00317.00
7.2.320.0060.01217.14
7.2.310.0060.01717.15
7.2.300.0100.00716.98
7.2.290.0110.00816.89
7.2.250.0090.01215.53
7.2.240.0060.01315.66
7.2.230.0060.01215.26
7.2.220.0070.01315.82
7.2.210.0110.00715.86
7.2.200.0060.00915.72
7.2.190.0060.01315.28
7.2.180.0060.00915.35
7.2.170.0080.00815.68
7.2.130.0040.01217.48
7.2.120.0030.01417.35
7.2.110.0090.00617.43
7.2.100.0040.00717.50
7.2.90.0040.00817.58
7.2.80.0110.00417.34
7.2.70.0080.00417.33
7.2.60.0090.00717.63
7.2.50.0130.00317.59
7.2.40.0040.00817.20
7.2.30.0070.01017.59
7.2.20.0030.01217.52
7.2.10.0030.00717.63
7.2.00.0040.01218.79
7.1.330.0040.01116.27
7.1.320.0030.00716.04
7.1.310.0040.00716.46
7.1.300.0070.00716.48
7.1.290.0030.01316.23
7.1.280.0160.00316.13
7.1.270.0130.00316.30
7.1.260.0070.00716.04
7.1.250.0090.00916.25
7.1.200.0080.00616.32
7.1.100.0060.00618.29
7.1.70.0000.00717.35
7.1.60.0070.01719.27
7.1.50.0000.02317.74
7.1.00.0000.08022.79
7.0.200.0310.00815.55
7.0.60.0030.08021.97
7.0.50.0100.03318.00
7.0.40.0030.04320.44
7.0.30.0300.07720.55
7.0.20.0370.08020.47
7.0.10.0070.08020.41
7.0.00.0070.05320.40
5.6.280.0030.03021.36
5.6.210.0100.07320.86
5.6.200.0130.08018.47
5.6.190.0070.05720.64
5.6.180.0330.07320.87
5.6.170.0400.05020.78
5.6.160.0130.04720.68
5.6.150.0130.07318.44
5.6.140.0070.08018.40
5.6.130.0100.08018.47
5.6.120.0030.08721.31
5.6.110.0130.07321.28
5.6.100.0270.07021.25
5.6.90.0200.05321.36
5.6.80.0070.03720.74
5.5.350.0370.07320.79
5.5.340.0100.06718.20
5.5.330.0070.04020.82
5.5.320.0330.07720.50
5.5.310.0230.08320.53
5.5.300.0030.04018.17
5.5.290.0030.06018.20
5.5.280.0030.08721.03
5.5.270.0000.04721.13
5.5.260.0070.04721.12
5.5.250.0100.06720.95
5.5.240.0070.07320.55

preferences:
57.54 ms | 401 KiB | 5 Q