3v4l.org

run code in 300+ PHP versions simultaneously
<?php include_once('geoip.inc'); //set an IPv6 address for testing $ip='2601:8:be00:cf20:ca60:ff:fe09:35b5'; /* test if $ip is v4 or v6 and assign appropriate .dat file in $gi run appropriate function geoip_country_code_by_addr() vs geoip_country_code_by_addr_v6() */ if((strpos($ip, ":") === false)) { //ipv4 $gi = geoip_open("/usr/share/GeoIP/GeoIP1.dat",GEOIP_STANDARD); $country = geoip_country_code_by_addr($gi, $ip); } else { //ipv6 $gi = geoip_open("/usr/share/GeoIP/GeoIPv6.dat",GEOIP_STANDARD); $country = geoip_country_code_by_addr_v6($gi, $ip); } echo $ip . "<br>" . $country;

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.0110.01116.63
8.3.50.0040.01516.46
8.3.40.0090.00618.97
8.3.30.0110.00418.79
8.3.20.0030.00621.94
8.3.10.0070.00021.76
8.3.00.0040.00419.68
8.2.180.0180.00418.54
8.2.170.0170.00322.96
8.2.160.0100.00320.35
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0000.00726.16
8.2.120.0040.00421.01
8.2.110.0070.00321.00
8.2.100.0080.00317.71
8.2.90.0000.00818.03
8.2.80.0000.00817.97
8.2.70.0030.00617.93
8.2.60.0050.00317.93
8.2.50.0000.00818.10
8.2.40.0040.00420.42
8.2.30.0000.00719.46
8.2.20.0020.00518.18
8.2.10.0000.00818.20
8.2.00.0020.00518.07
8.1.280.0090.00625.92
8.1.270.0040.00422.04
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0040.00422.18
8.1.230.0060.00920.83
8.1.220.0040.00417.74
8.1.210.0040.00418.92
8.1.200.0030.00617.23
8.1.190.0060.00317.23
8.1.180.0030.00518.10
8.1.170.0080.00018.49
8.1.160.0070.00018.90
8.1.150.0070.00019.04
8.1.140.0040.00417.73
8.1.130.0070.00018.91
8.1.120.0000.00717.41
8.1.110.0040.00417.45
8.1.100.0040.00417.50
8.1.90.0000.00817.53
8.1.80.0030.00517.54
8.1.70.0030.00317.48
8.1.60.0060.00317.68
8.1.50.0000.00817.66
8.1.40.0000.00817.57
8.1.30.0060.00317.73
8.1.20.0030.00617.66
8.1.10.0030.00517.57
8.1.00.0080.00017.60
8.0.300.0050.00219.64
8.0.290.0040.00416.88
8.0.280.0030.00318.50
8.0.270.0030.00317.34
8.0.260.0030.00517.22
8.0.250.0030.00317.12
8.0.240.0090.00017.00
8.0.230.0030.00517.10
8.0.220.0000.00716.94
8.0.210.0040.00416.93
8.0.200.0030.00317.11
8.0.190.0000.00717.20
8.0.180.0000.00717.06
8.0.170.0070.00417.08
8.0.160.0040.00316.93
8.0.150.0040.00416.87
8.0.140.0040.00416.97
8.0.130.0030.00313.46
8.0.120.0080.00016.99
8.0.110.0040.00416.96
8.0.100.0000.00717.01
8.0.90.0030.00617.04
8.0.80.0170.00717.04
8.0.70.0000.00817.03
8.0.60.0040.00416.95
8.0.50.0040.00417.08
8.0.30.0110.01217.14
8.0.20.0100.01217.40
8.0.10.0000.00717.17
8.0.00.0100.00816.92
7.4.330.0050.00015.55
7.4.320.0030.00316.62
7.4.300.0030.00316.54
7.4.290.0070.00016.47
7.4.280.0040.00416.48
7.4.270.0030.00616.64
7.4.260.0000.00716.58
7.4.250.0040.00416.45
7.4.240.0000.00716.68
7.4.230.0040.00316.73
7.4.220.0000.00716.61
7.4.210.0070.00716.56
7.4.200.0070.00016.71
7.4.160.0140.00416.58
7.4.140.0100.00717.86
7.4.130.0060.01216.42
7.4.120.0110.00916.63
7.4.110.0070.01016.60
7.4.100.0180.00016.52
7.4.90.0070.01416.63
7.4.80.0060.01619.39
7.4.70.0030.01416.63
7.4.60.0130.00316.51
7.4.50.0000.01916.73
7.4.40.0110.01116.38
7.4.00.0060.00614.93
7.3.330.0060.00013.32
7.3.320.0000.00513.14
7.3.310.0030.00316.18
7.3.300.0030.00316.29
7.3.290.0070.00716.33
7.3.280.0060.00916.44
7.3.260.0130.00616.37
7.3.240.0060.01216.43
7.3.230.0090.00916.34
7.3.210.0120.01016.49
7.3.200.0070.01016.53
7.3.190.0160.00016.36
7.3.180.0060.01016.42
7.3.170.0150.00316.52
7.3.160.0160.00616.46
7.2.330.0150.00316.54
7.2.320.0140.00616.54
7.2.310.0070.01016.55
7.2.300.0100.01316.66
7.2.290.0030.01316.55
7.2.60.0090.00616.74
7.2.50.0080.00416.87
7.2.40.0090.01719.49
7.2.30.0110.01319.74
7.2.20.0090.01519.68
7.2.10.0110.01419.59
7.2.00.0080.01119.57
7.1.200.0040.00715.74
7.1.160.0080.01418.89
7.1.150.0060.01318.69
7.1.140.0060.01418.82
7.1.130.0080.01418.68
7.1.120.0070.01618.78
7.1.110.0050.01918.16
7.1.100.0080.01117.81
7.1.90.0130.00817.77
7.1.80.0120.00817.79
7.1.70.0110.00916.97
7.1.60.0280.01135.02
7.1.50.0300.01934.80
7.1.40.0250.01834.11
7.1.30.0270.01634.43
7.1.20.0260.01734.66
7.1.10.0070.01616.41
7.1.00.0080.01016.68

preferences:
59.06 ms | 401 KiB | 5 Q