3v4l.org

run code in 300+ PHP versions simultaneously
<?php $lat1 = 35.697959; $lat2 = 35.697959; $lon1 = 139.707085; $lon2 = 139.707085; $theta = $lon1 - $lon2; $dist = sin(deg2rad($lat1)) * sin(deg2rad($lat2)) + cos(deg2rad($lat1)) * cos(deg2rad($lat2)) * cos(deg2rad($theta)); var_dump($dist); // returns 1 $dist = acos(min(max($dist,-1.0),1.0)); var_dump($dist); // returns NAN $x = 1; $x = acos($x); var_dump($x); // doesn't return NAN

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.4.20.0000.01017.82
8.4.10.0060.00317.68
8.3.150.0060.01217.30
8.3.140.0030.00617.40
8.3.130.0030.00618.78
8.3.120.0090.00619.32
8.3.110.0060.00620.94
8.3.100.0030.00624.06
8.3.90.0090.00026.77
8.3.80.0170.00726.22
8.3.70.0070.01017.13
8.3.60.0140.00318.55
8.3.50.0090.01122.08
8.3.40.0090.00918.69
8.3.30.0110.00419.04
8.3.20.0080.00019.54
8.3.10.0040.00422.32
8.3.00.0030.00621.14
8.2.260.0080.00018.52
8.2.250.0060.00316.95
8.2.240.0000.00919.32
8.2.230.0040.00422.58
8.2.220.0060.00337.54
8.2.210.0000.00826.77
8.2.200.0140.00818.18
8.2.190.0160.00616.63
8.2.180.0070.01425.92
8.2.170.0040.01122.96
8.2.160.0110.00420.68
8.2.150.0040.00424.18
8.2.140.0050.00224.66
8.2.130.0040.00426.16
8.2.120.0040.00421.13
8.2.110.0060.00320.77
8.2.100.0000.01117.96
8.2.90.0050.00318.28
8.2.80.0000.00817.97
8.2.70.0060.00317.88
8.2.60.0030.00618.28
8.2.50.0080.00018.07
8.2.40.0070.00618.97
8.2.30.0050.00718.03
8.2.20.0060.00617.84
8.2.10.0060.00618.13
8.2.00.0020.01018.14
8.1.310.0060.00316.89
8.1.300.0070.01120.23
8.1.290.0030.00630.84
8.1.280.0140.00725.92
8.1.270.0040.00424.21
8.1.260.0000.00826.35
8.1.250.0080.00028.09
8.1.240.0050.00522.48
8.1.230.0000.01224.03
8.1.220.0070.00018.02
8.1.210.0030.00618.77
8.1.200.0100.00017.73
8.1.190.0000.00817.47
8.1.180.0060.00318.10
8.1.170.0060.00718.38
8.1.160.0070.00618.44
8.1.150.0060.00718.44
8.1.140.0070.00618.85
8.1.130.0090.00417.90
8.1.120.0050.00817.77
8.1.110.0080.00617.74
8.1.100.0140.00217.71
8.1.90.0110.00517.77
8.1.80.0120.00117.74
8.1.70.0080.00617.72
8.1.60.0090.00617.76
8.1.50.0090.00617.79
8.1.40.0080.00717.77
8.1.30.0110.00317.89
8.1.20.0080.00617.80
8.1.10.0070.00717.79
8.1.00.0120.00517.75
8.0.300.0000.00718.77
8.0.290.0070.00017.13
8.0.280.0080.00418.34
8.0.270.0000.01217.47
8.0.260.0070.00517.71
8.0.250.0100.00317.54
8.0.240.0050.00717.52
8.0.230.0100.00417.40
8.0.220.0070.00617.37
8.0.210.0060.00617.35
8.0.200.0080.00517.36
8.0.190.0070.00617.37
8.0.180.0070.00617.36
8.0.170.0090.00517.32
8.0.160.0070.00517.30
8.0.150.0080.00617.25
8.0.140.0090.00517.34
8.0.130.0090.00316.14
8.0.120.0120.00117.33
8.0.110.0120.00117.27
8.0.100.0060.00717.31
8.0.90.0080.00617.29
8.0.80.0120.00317.32
8.0.70.0080.00617.25
8.0.60.0070.00617.33
8.0.50.0100.00217.34
8.0.30.0080.01017.28
8.0.20.0130.00517.43
8.0.10.0050.00817.40
8.0.00.0090.00717.21
7.4.330.0080.00116.51
7.4.320.0090.00317.29
7.4.300.0070.00617.17
7.4.290.0060.00817.16
7.4.280.0070.00717.17
7.4.270.0080.00617.13
7.4.260.0140.00117.08
7.4.250.0090.00517.13
7.4.240.0100.00417.15
7.4.230.0110.00217.07
7.4.220.0080.00817.06
7.4.210.0110.00517.11
7.4.200.0100.00217.22
7.4.190.0130.00517.35
7.4.180.0140.00017.35
7.4.160.0080.00517.12
7.4.150.0080.00617.32
7.4.140.0090.00817.56
7.4.130.0110.00716.83
7.4.120.0140.00716.84
7.4.110.0140.00716.79
7.4.100.0120.00616.74
7.4.90.0130.00516.76
7.4.80.0120.00717.02
7.4.70.0120.00916.75
7.4.60.0120.00916.70
7.4.50.0120.00916.75
7.4.40.0130.01016.67
7.4.30.0130.00716.71
7.4.20.0110.01016.68
7.4.10.0140.00816.73
7.4.00.0080.00916.55
7.3.330.0100.00315.95
7.3.320.0080.00515.89
7.3.310.0080.00416.97
7.3.300.0100.00216.95
7.3.290.0100.00516.95
7.3.280.0100.00616.75
7.3.270.0100.00717.27
7.3.260.0100.00616.84
7.3.250.0160.00716.95
7.3.240.0130.00716.73
7.3.230.0140.00716.74
7.3.220.0110.00716.70
7.3.210.0130.00516.63
7.3.200.0130.00716.64
7.3.190.0140.00816.66
7.3.180.0130.00816.65
7.3.170.0150.00816.62
7.3.160.0140.00716.66
7.3.150.0130.01016.68
7.3.140.0190.00416.72
7.3.130.0150.00716.74
7.3.120.0150.00716.69
7.3.110.0140.00816.62
7.3.100.0160.00616.67
7.3.90.0100.00916.66
7.3.80.0130.00716.49
7.3.70.0100.00816.26
7.3.60.0100.00816.33
7.3.50.0110.00716.32
7.3.40.0110.00616.29
7.3.30.0110.00616.38
7.3.20.0120.00916.47
7.3.10.0120.00716.66
7.3.00.0190.00716.53
7.2.340.0170.00816.95
7.2.330.0110.01016.81
7.2.320.0170.00816.82
7.2.310.0150.00916.74
7.2.300.0150.00916.73
7.2.290.0160.00816.78
7.2.280.0190.00616.74
7.2.270.0150.01016.70
7.2.260.0130.01016.74
7.2.250.0190.00716.75
7.2.240.0150.00916.75
7.2.230.0130.00816.68
7.2.220.0130.00916.76
7.2.210.0140.00816.58
7.2.200.0130.00716.44
7.2.190.0110.00916.43
7.2.180.0110.00916.44
7.2.170.0120.00816.46
7.2.160.0100.00916.46
7.2.150.0140.00716.68
7.2.140.0160.00816.62
7.2.130.0110.00916.78
7.2.120.0170.00716.75
7.2.110.0130.00816.77
7.2.100.0140.00716.73
7.2.90.0100.00916.74
7.2.80.0120.00816.75
7.2.70.0140.00916.81
7.2.60.0120.00816.83
7.2.50.0140.00716.71
7.2.40.0130.00816.78
7.2.30.0140.00816.81
7.2.20.0130.01016.68
7.2.10.0190.00916.89
7.2.00.0200.00716.95
7.1.330.0140.01216.17
7.1.320.0190.00916.18
7.1.310.0180.00715.97
7.1.300.0160.00815.74
7.1.290.0180.00715.77
7.1.280.0170.00815.76
7.1.270.0170.00815.70
7.1.260.0190.00715.71
7.1.250.0170.00715.77
7.1.240.0180.00815.75
7.1.230.0200.00615.72
7.1.220.0190.00715.70
7.1.210.0210.00715.73
7.1.200.0210.00515.74
7.1.190.0210.00615.73
7.1.180.0200.00715.70
7.1.170.0150.01115.70
7.1.160.0190.00915.68
7.1.150.0190.00815.62
7.1.140.0200.00715.74
7.1.130.0200.00815.84
7.1.120.0220.00615.82
7.1.110.0190.00815.78
7.1.100.0210.00716.06
7.1.90.0210.00915.79
7.1.80.0190.00815.75
7.1.70.0220.00615.87
7.1.60.0170.00917.56
7.1.50.0190.00817.30
7.1.40.0190.01017.23
7.1.30.0200.00917.33
7.1.20.0200.00817.25
7.1.10.0190.00715.70
7.1.00.0190.01516.25
7.0.330.0280.00615.44
7.0.320.0180.00715.51
7.0.310.0170.00915.50
7.0.300.0170.00815.44
7.0.290.0200.00715.48
7.0.280.0170.00915.42
7.0.270.0200.00615.56
7.0.260.0200.00715.50
7.0.250.0180.00815.50
7.0.240.0190.00715.54
7.0.230.0200.00715.58
7.0.220.0190.00715.56
7.0.210.0200.00815.47
7.0.200.0180.00815.47
7.0.190.0200.00615.40
7.0.180.0190.00715.43
7.0.170.0200.00515.45
7.0.160.0170.00815.38
7.0.150.0180.00815.37
7.0.140.0190.00615.43
7.0.130.0210.00815.44
7.0.120.0180.00815.45
7.0.110.0160.01315.74
7.0.100.0360.01115.75
7.0.90.0200.01115.79
7.0.80.0180.01015.74
7.0.70.0190.00815.84
7.0.60.0170.01215.73
7.0.50.0150.01115.82
7.0.40.0180.01215.79
7.0.30.0140.01115.79
7.0.20.0190.00815.74
7.0.10.0170.01015.81
7.0.00.0150.01115.78
5.6.400.0150.01015.76
5.6.390.0170.01015.93
5.6.380.0180.00915.88
5.6.370.0170.00815.80
5.6.360.0150.01015.91
5.6.350.0170.01015.84
5.6.340.0160.01015.90
5.6.330.0170.00915.83
5.6.320.0160.01015.83
5.6.310.0160.01015.90
5.6.300.0160.01416.36
5.6.290.0160.01516.28
5.6.280.0170.01716.75
5.6.270.0170.01216.30
5.6.260.0120.02016.73
5.6.250.0170.01616.71
5.6.240.0160.01716.65
5.6.230.0150.01516.65
5.6.220.0130.01716.69
5.6.210.0170.01616.73
5.6.200.0150.01716.63
5.6.190.0170.01616.71
5.6.180.0170.01416.69
5.6.170.0170.01516.69
5.6.160.0150.01816.71
5.6.150.0170.01616.69
5.6.140.0170.01516.70
5.6.130.0160.01716.66
5.6.120.0160.01416.66
5.6.110.0170.01416.64
5.6.100.0160.01616.67
5.6.90.0150.01616.66
5.6.80.0160.01316.50
5.6.70.0130.01916.48
5.6.60.0170.01216.51
5.6.50.0160.01416.54
5.6.40.0170.01416.57
5.6.30.0150.01716.52
5.6.20.0160.01616.50
5.6.10.0150.01316.52
5.6.00.0150.01516.49
5.5.380.0180.01316.12
5.5.370.0160.01516.10
5.5.360.0170.01516.16
5.5.350.0190.01316.13
5.5.340.0170.01416.22
5.5.330.0150.01516.15
5.5.320.0170.01416.21
5.5.310.0160.01516.21
5.5.300.0140.01716.15
5.5.290.0150.01616.14
5.5.280.0140.01516.17
5.5.270.0160.01416.07
5.5.260.0150.01516.08
5.5.250.0150.01616.12
5.5.240.0150.01516.00
5.5.230.0140.01515.95
5.5.220.0140.01616.00
5.5.210.0150.01616.05
5.5.200.0140.01616.01
5.5.190.0150.01716.03
5.5.180.0150.01515.96
5.5.170.0140.01015.78
5.5.160.0170.01516.06
5.5.150.0150.01616.08
5.5.140.0140.01615.93
5.5.130.0160.01615.96
5.5.120.0160.01515.99
5.5.110.0150.01615.97
5.5.100.0140.01616.01
5.5.90.0160.01715.95
5.5.80.0150.01716.02
5.5.70.0140.01816.03
5.5.60.0140.01515.92
5.5.50.0150.01615.93
5.5.40.0160.01715.97
5.5.30.0150.01515.95
5.5.20.0140.02215.98
5.5.10.0130.01516.01
5.5.00.0130.01815.89

preferences:
41.89 ms | 403 KiB | 5 Q