3v4l.org

run code in 300+ PHP versions simultaneously
<?php function get_list_ip($ip_addr_cidr){ $ip_arr = explode("/", $ip_addr_cidr); $bin = ""; for($i=1;$i<=32;$i++) { $bin .= $ip_arr[1] >= $i ? '1' : '0'; } $ip_arr[1] = bindec($bin); $ip = ip2long($ip_arr[0]); $nm = $ip_arr[1]; $nw = ($ip & $nm); $bc = $nw | ~$nm; $bc_long = ip2long(long2ip($bc)); echo "Number of Hosts: " . ($bc_long - $nw - 1) . "<br/>"; echo "Host Range: " . long2ip($nw + 1) . " -> " . long2ip($bc - 1) . "<br/>". "<br/>"; for($zm=1;($nw + $zm)<=($bc_long - 1);$zm++) { echo long2ip($nw + $zm). "<br/>"; } } get_list_ip('192.168.1.101/22');

Abusive script

This script was stopped while abusing our resources

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.110.0040.00820.94
8.3.100.0030.00724.06
8.3.90.0070.01426.77
8.3.80.0120.00018.68
8.3.70.0070.01018.80
8.3.60.0070.01418.58
8.3.50.0070.01716.62
8.3.40.0130.00718.78
8.3.30.0190.00618.70
8.3.20.0040.00422.15
8.3.10.0090.00021.93
8.3.00.0030.00619.81
8.2.230.0060.00322.58
8.2.220.0080.00337.54
8.2.210.0170.00026.77
8.2.200.0070.00716.75
8.2.190.0170.00716.83
8.2.180.0130.00716.75
8.2.170.0070.01022.96
8.2.160.0090.00619.52
8.2.150.0060.00324.18
8.2.140.0060.00324.66
8.2.130.0090.00026.16
8.2.120.0030.00620.01
8.2.110.0070.00321.12
8.2.100.0060.00618.03
8.2.90.0060.00317.85
8.2.80.0030.00719.28
8.2.70.0080.00317.75
8.2.60.0040.00417.63
8.2.50.0030.00618.07
8.2.40.0040.00418.35
8.2.30.0000.00818.09
8.2.20.0080.00018.19
8.2.10.0080.00018.14
8.2.00.0030.00518.08
8.1.290.0000.01130.84
8.1.280.0100.00725.92
8.1.270.0040.00422.32
8.1.260.0000.00926.35
8.1.250.0100.00028.09
8.1.240.0040.00723.92
8.1.230.0100.00321.03
8.1.220.0000.00817.79
8.1.210.0000.00818.77
8.1.200.0000.01217.48
8.1.190.0060.00317.35
8.1.180.0090.00018.10
8.1.170.0000.01018.64
8.1.160.0080.00018.88
8.1.150.0060.00318.97
8.1.140.0030.00619.61
8.1.130.0030.00617.59
8.1.120.0040.00417.52
8.1.110.0000.00917.54
8.1.100.0030.00717.57
8.1.90.0030.00617.53
8.1.80.0000.00817.54
8.1.70.0070.00417.48
8.1.60.0050.00517.66
8.1.50.0100.00017.59
8.1.40.0030.00617.62
8.1.30.0060.00317.63
8.1.20.0080.00017.73
8.1.10.0050.00517.73
8.1.00.0040.00417.65
8.0.300.0040.00420.16
8.0.290.0000.00816.63
8.0.280.0090.00018.59
8.0.270.0050.00316.91
8.0.260.0070.00016.83
8.0.250.0080.00017.00
8.0.240.0000.01017.00
8.0.230.0040.00416.98
8.0.220.0050.00217.03
8.0.210.0060.00316.95
8.0.200.0000.01017.03
8.0.190.0090.00017.04
8.0.180.0000.00816.88
8.0.170.0000.00916.98
8.0.160.0090.00016.90
8.0.150.0030.00516.94
8.0.140.0000.00816.84
8.0.130.0000.00613.53
8.0.120.0060.00316.91
8.0.110.0040.00416.89
8.0.100.0060.00316.81
8.0.90.0080.00016.95
8.0.80.0070.01116.88
8.0.70.0040.00416.85
8.0.60.0060.00316.79
8.0.50.0030.00617.10
8.0.30.0120.00917.27
8.0.20.0170.01117.40
8.0.10.0040.00417.07
8.0.00.0180.00516.91
7.4.330.0030.00315.55
7.4.320.0030.00516.63
7.4.300.0030.00516.64
7.4.290.0040.00416.59
7.4.280.0000.01016.78
7.4.270.0000.00716.73
7.4.260.0050.00216.54
7.4.250.0000.00816.67
7.4.240.0040.00416.76
7.4.230.0040.00416.75
7.4.220.0140.02116.70
7.4.210.0080.01316.61
7.4.200.0030.00516.84
7.4.160.0090.01316.66
7.4.150.0160.00617.40
7.4.140.0130.01617.86
7.4.130.0100.01316.48
7.4.120.0150.01116.64
7.4.110.0060.01716.73
7.4.100.0170.01416.71
7.4.90.0100.01316.64
7.4.80.0110.01119.39
7.4.70.0190.00216.75
7.4.60.0190.00016.60
7.4.50.0070.01016.45
7.4.40.0110.01116.66
7.4.30.0120.00816.62
7.4.00.0090.00914.87
7.3.330.0030.00313.45
7.3.320.0030.00313.43
7.3.310.0050.00316.34
7.3.300.0030.00516.45
7.3.290.0040.00416.39
7.3.280.0090.01116.44
7.3.270.0160.00617.40
7.3.260.0140.00816.72
7.3.250.0160.01416.53
7.3.240.0130.00916.68
7.3.230.0090.01316.50
7.3.210.0090.01216.51
7.3.200.0150.00916.56
7.3.190.0140.00716.49
7.3.180.0140.00616.67
7.3.170.0210.00616.79
7.3.160.0100.01716.45
7.3.50.0110.00514.96
7.3.40.0080.00414.82
7.3.30.0110.01414.77
7.3.20.0100.00715.09
7.3.10.0960.00314.66
7.3.00.0270.00715.11
7.2.330.0090.01316.59
7.2.320.0100.01716.85
7.2.310.0070.01416.80
7.2.300.0170.01116.66
7.2.290.0090.01216.80
7.2.180.0030.00914.98
7.2.170.0140.00715.18
7.2.160.0150.01215.00
7.2.150.0160.00615.04
7.2.140.0090.01315.25
7.2.130.0100.02015.28
7.2.120.0090.00915.30
7.2.110.0140.00714.98
7.2.100.0210.00415.00
7.2.90.0170.00315.25
7.2.80.0130.01715.31
7.2.70.0040.01315.10
7.2.60.0100.00916.20
7.2.50.0170.00215.27
7.2.40.0360.00315.08
7.2.30.0110.01315.19
7.2.20.0080.02115.16
7.2.10.0180.00915.19
7.2.00.0340.01015.25
7.1.280.0110.01113.98
7.1.270.0110.00714.06
7.1.260.0040.01414.06
7.1.250.0110.01514.11
7.1.240.0230.00013.91
7.1.230.0270.00614.20
7.1.220.0070.01113.88
7.1.210.0090.01913.97
7.1.200.0100.01014.75
7.1.190.0120.01214.09
7.1.180.0270.00214.18
7.1.170.0110.01814.09
7.1.160.0260.00814.16
7.1.150.0180.00913.91
7.1.140.0160.01014.07
7.1.130.0180.00714.07
7.1.120.0250.01214.25
7.1.110.0330.00714.10
7.1.100.0170.01113.99
7.1.90.0170.00313.75
7.1.80.0120.01214.21
7.1.70.0080.01415.52
7.1.60.0080.01515.65
7.1.50.0310.00623.45
7.1.40.0240.00823.31
7.1.30.0260.01623.42
7.1.20.0260.01523.23
7.1.10.0360.01414.33
7.1.00.0290.00914.50
7.0.330.0170.00613.39
7.0.320.0230.00013.80
7.0.310.0260.00413.69
7.0.300.0220.00813.89
7.0.290.0170.00913.77
7.0.280.0150.00513.73
7.0.270.0140.00513.69
7.0.260.0110.01413.68
7.0.250.0170.01313.83
7.0.240.0160.00413.80
7.0.230.0130.01013.72
7.0.220.0130.01613.66
7.0.210.0150.00913.45
7.0.200.0140.01315.24
7.0.190.0490.01014.29
7.0.180.0220.01614.13
7.0.170.0300.00814.08
7.0.160.0210.01114.10
7.0.150.0280.00714.06
7.0.140.0240.01414.08
7.0.130.0250.00814.10
7.0.120.0260.01514.07
7.0.110.0400.01714.16
7.0.100.0240.01214.02
7.0.90.0230.01114.15
7.0.80.0230.01414.09
7.0.70.0320.01014.12
7.0.60.0210.01114.09
7.0.50.0130.01314.16
7.0.40.0220.00614.13
7.0.30.0150.01314.07
7.0.20.0240.01614.29
7.0.10.0190.01214.09
7.0.00.0210.00714.17
5.6.400.0200.02014.74
5.6.390.0140.00814.67
5.6.380.0110.02314.45

preferences:
71.04 ms | 403 KiB | 5 Q