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.0130.01018.80
8.3.50.0110.01118.55
8.3.40.0100.00719.34
8.3.30.0100.00719.37
8.3.20.0000.00720.85
8.3.10.0040.00421.28
8.3.00.0080.00021.02
8.2.180.0090.00918.66
8.2.170.0150.00622.96
8.2.160.0080.00822.72
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0000.00721.37
8.2.120.0050.00226.35
8.2.110.0080.00020.75
8.2.100.0070.00418.41
8.2.90.0000.00819.55
8.2.80.0050.00318.25
8.2.70.0000.00818.25
8.2.60.0000.00818.43
8.2.50.0030.00818.09
8.2.40.0000.00920.96
8.2.30.0030.00619.88
8.2.20.0050.00318.28
8.2.10.0070.00018.80
8.2.00.0080.00318.56
8.1.280.0120.00325.92
8.1.270.0060.01224.30
8.1.260.0040.00428.09
8.1.250.0070.00028.09
8.1.240.0030.01322.97
8.1.230.0080.00423.05
8.1.220.0040.00418.29
8.1.210.0090.00018.77
8.1.200.0060.00317.85
8.1.190.0030.00617.75
8.1.180.0030.00518.10
8.1.170.0040.00419.03
8.1.160.0050.00221.26
8.1.150.0030.00619.29
8.1.140.0030.00520.18
8.1.130.0000.00718.18
8.1.120.0040.00318.06
8.1.110.0040.00417.97
8.1.100.0000.00818.07
8.1.90.0040.00418.02
8.1.80.0000.00818.06
8.1.70.0050.00317.98
8.1.60.0080.00018.20
8.1.50.0040.00418.15
8.1.40.0060.00618.12
8.1.30.0030.00618.29
8.1.20.0090.00018.16
8.1.10.0040.00418.11
8.1.00.0080.00018.15
8.0.300.0020.00518.77
8.0.290.0000.00817.38
8.0.280.0050.00218.85
8.0.270.0080.00017.82
8.0.260.0030.00317.75
8.0.250.0000.00717.52
8.0.240.0040.00417.54
8.0.230.0050.00217.70
8.0.220.0030.00317.50
8.0.210.0040.00417.41
8.0.200.0030.00317.69
8.0.190.0060.00317.66
8.0.180.0040.00417.56
8.0.170.0030.00617.49
8.0.160.0040.00417.46
8.0.150.0080.00417.43
8.0.140.0070.00317.50
8.0.130.0000.00513.79
8.0.120.0040.00417.45
8.0.110.0040.00417.53
8.0.100.0040.00417.45
8.0.90.0000.00717.55
8.0.80.0030.01617.32
8.0.70.0050.00317.42
8.0.60.0080.00017.67
8.0.50.0080.00017.42
8.0.30.0100.01017.47
8.0.20.0080.01217.52
8.0.10.0070.00017.53
8.0.00.0090.01417.07
7.4.330.0000.00517.12
7.4.320.0030.00317.09
7.4.300.0050.00317.09
7.4.290.0040.00217.10
7.4.280.0000.00817.18
7.4.270.0000.00717.15
7.4.260.0050.00417.16
7.4.250.0040.00417.10
7.4.240.0060.00317.21
7.4.230.0070.00016.89
7.4.220.0070.01316.95
7.4.210.0030.01016.79
7.4.200.0050.00216.84
7.4.160.0100.00616.84
7.4.150.0030.01717.40
7.4.140.0080.01317.86
7.4.130.0070.01017.14
7.4.120.0090.01016.97
7.4.110.0060.01216.89
7.4.100.0090.00916.88
7.4.90.0060.01016.76
7.4.80.0040.02019.39
7.4.70.0120.00316.75
7.4.60.0030.01416.83
7.4.50.0100.00717.03
7.4.40.0100.01016.64
7.4.30.0070.01016.87
7.4.10.0070.01115.40
7.4.00.0030.01215.50
7.3.330.0070.00013.89
7.3.320.0070.00013.88
7.3.310.0070.00016.99
7.3.300.0000.00716.94
7.3.290.0080.00916.64
7.3.280.0070.00816.79
7.3.270.0150.00317.40
7.3.260.0100.00717.11
7.3.240.0100.00716.79
7.3.230.0100.01316.88
7.3.210.0070.01016.72
7.3.200.0100.01016.95
7.3.190.0060.00916.97
7.3.180.0130.00316.74
7.3.170.0170.00016.90
7.3.160.0060.00916.87
7.3.130.0120.00615.50
7.3.120.0130.00315.52
7.3.110.0100.01015.52
7.3.100.0080.00415.48
7.3.90.0060.00615.69
7.3.80.0000.00915.56
7.3.70.0090.00315.56
7.3.60.0030.01015.54
7.3.50.0000.00815.52
7.3.40.0090.00615.50
7.3.30.0040.01215.52
7.3.20.0030.00917.48
7.3.10.0100.00317.09
7.3.00.0070.00417.19
7.2.330.0120.00616.83
7.2.320.0090.00916.96
7.2.310.0100.01317.01
7.2.300.0060.01516.83
7.2.290.0060.01317.15
7.2.260.0060.00615.55
7.2.250.0060.01215.63
7.2.240.0040.01215.88
7.2.230.0060.01315.25
7.2.220.0100.00715.55
7.2.210.0040.00815.58
7.2.200.0080.00615.72
7.2.190.0000.01115.53
7.2.180.0060.00915.38
7.2.170.0090.00615.57
7.2.160.0030.00615.62
7.2.150.0030.01017.34
7.2.140.0060.00617.45
7.2.130.0050.00517.56
7.2.120.0070.00717.52
7.2.110.0060.00917.47
7.2.100.0070.01017.60
7.2.90.0040.01117.35
7.2.80.0040.01117.45
7.2.70.0030.01017.66
7.2.60.0050.00817.39
7.2.50.0070.00717.55
7.2.40.0030.00917.48
7.2.30.0110.00417.52
7.2.20.0060.01017.62
7.2.10.0000.01017.39
7.2.00.0060.00718.58
7.1.330.0090.00616.36
7.1.320.0140.00316.49
7.1.310.0070.00716.69
7.1.300.0090.00616.46
7.1.290.0090.00316.16
7.1.280.0070.00716.46
7.1.270.0060.00616.55
7.1.260.0060.00316.45
7.1.250.0040.00816.52
7.1.240.0030.00916.50
7.1.230.0000.01416.26
7.1.220.0000.01416.15
7.1.210.0030.00916.50
7.1.200.0060.00916.57
7.1.190.0080.00416.44
7.1.180.0040.00716.65
7.1.170.0070.00716.18
7.1.160.0050.00516.52
7.1.150.0040.00416.43
7.1.140.0000.01316.52
7.1.130.0040.00416.56
7.1.120.0080.00416.45
7.1.110.0100.00316.57
7.1.100.0020.00817.75
7.1.90.0050.00916.66
7.1.80.0030.01016.32
7.1.70.0030.00617.17
7.1.60.0070.01417.86
7.1.50.0050.01316.70
7.1.40.0070.00716.14
7.1.30.0040.00816.33
7.1.20.0070.00716.59
7.1.10.0070.00416.18
7.1.00.0030.04019.56
7.0.330.0110.00016.05
7.0.320.0040.00815.98
7.0.310.0080.00315.75
7.0.300.0030.01016.11
7.0.290.0000.01316.16
7.0.280.0000.01316.00
7.0.270.0000.01016.21
7.0.260.0080.00415.88
7.0.250.0130.00316.09
7.0.240.0030.00615.92
7.0.230.0030.01116.09
7.0.220.0060.00615.88
7.0.210.0090.00615.79
7.0.200.0210.00515.78
7.0.190.0070.01016.28
7.0.180.0040.01116.03
7.0.170.0000.01016.16
7.0.160.0060.00815.82
7.0.150.0110.00015.60
7.0.140.0100.00316.00
7.0.130.0100.00315.90
7.0.120.0040.01116.09
7.0.110.0070.00715.99
7.0.100.0060.00616.20
7.0.90.0030.00915.80
7.0.80.0090.00616.01
7.0.70.0030.01416.09
7.0.60.0020.02619.08
7.0.50.0030.02517.07
7.0.40.0070.02317.23
7.0.30.0120.04917.07
7.0.20.0180.03617.29
7.0.10.0050.03517.25
7.0.00.0080.03017.17
5.6.400.0080.00314.83
5.6.390.0050.00514.78
5.6.380.0040.00814.99
5.6.370.0030.01014.69
5.6.360.0060.00615.04
5.6.350.0000.01115.00
5.6.340.0060.00915.07
5.6.330.0030.01214.83
5.6.320.0070.00714.66
5.6.310.0000.01514.71
5.6.300.0000.01714.82
5.6.290.0060.00314.67
5.6.280.0030.02218.28
5.6.270.0040.01115.08
5.6.260.0030.01014.94
5.6.250.0060.00615.14
5.6.240.0090.00615.00
5.6.230.0130.00315.07
5.6.220.0000.01115.15
5.6.210.0150.02817.91
5.6.200.0070.02316.51
5.6.190.0060.02517.96
5.6.180.0220.03518.02
5.6.170.0170.03517.95
5.6.160.0050.04917.64
5.6.150.0070.02316.72
5.6.140.0030.03416.58
5.6.130.0070.04516.54
5.6.120.0080.04318.17
5.6.110.0050.04818.29
5.6.100.0020.04418.18
5.6.90.0080.03218.15
5.6.80.0060.02517.84
5.6.70.0000.01614.95
5.6.60.0060.00314.67
5.6.50.0120.00315.07
5.6.40.0000.00914.88
5.6.30.0030.01014.94
5.6.20.0050.01114.60
5.6.10.0120.00314.64
5.6.00.0030.01314.91
5.5.380.0070.00314.86
5.5.370.0040.01214.84
5.5.360.0040.00815.08
5.5.350.0180.03817.65
5.5.340.0050.02516.55
5.5.330.0050.02717.84
5.5.320.0240.03217.91
5.5.310.0130.04517.68
5.5.300.0140.03416.60
5.5.290.0060.04316.44
5.5.280.0050.04718.06
5.5.270.0050.02318.00
5.5.260.0050.03518.00
5.5.250.0050.04417.96
5.5.240.0050.03017.72
5.5.230.0000.00914.95
5.5.220.0070.00714.80
5.5.210.0080.00814.69
5.5.200.0090.00614.62
5.5.190.0030.01014.34
5.5.180.0030.00614.57
5.5.170.0040.01114.76
5.5.160.0030.01314.52
5.5.150.0070.00714.82
5.5.140.0090.00014.95
5.5.130.0070.01014.76
5.5.120.0030.01214.56
5.5.110.0100.00614.97
5.5.100.0060.00914.72
5.5.90.0060.00914.95
5.5.80.0090.00614.92
5.5.70.0070.00714.91
5.5.60.0090.00014.68
5.5.50.0040.00814.45
5.5.40.0060.00315.02
5.5.30.0090.00614.53
5.5.20.0060.00915.01
5.5.10.0060.01015.09
5.5.00.0090.00314.58

preferences:
52.35 ms | 400 KiB | 5 Q