3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $range = "192.168.100.0/24"; function ipListFromRange($range){ $parts = explode('/',$range); $exponent = 32-$parts[1].'-'; $count = pow(2,$exponent); $start = ip2long($parts[0]); $end = $start+$count; return array_map('long2ip', range($start, $end) ); } print_r(ipListFromRange($range));
Output for 7.1.0
Notice: A non well formed numeric value encountered in /in/fE3h5 on line 8 Array ( [0] => 192.168.100.0 [1] => 192.168.100.1 [2] => 192.168.100.2 [3] => 192.168.100.3 [4] => 192.168.100.4 [5] => 192.168.100.5 [6] => 192.168.100.6 [7] => 192.168.100.7 [8] => 192.168.100.8 [9] => 192.168.100.9 [10] => 192.168.100.10 [11] => 192.168.100.11 [12] => 192.168.100.12 [13] => 192.168.100.13 [14] => 192.168.100.14 [15] => 192.168.100.15 [16] => 192.168.100.16 [17] => 192.168.100.17 [18] => 192.168.100.18 [19] => 192.168.100.19 [20] => 192.168.100.20 [21] => 192.168.100.21 [22] => 192.168.100.22 [23] => 192.168.100.23 [24] => 192.168.100.24 [25] => 192.168.100.25 [26] => 192.168.100.26 [27] => 192.168.100.27 [28] => 192.168.100.28 [29] => 192.168.100.29 [30] => 192.168.100.30 [31] => 192.168.100.31 [32] => 192.168.100.32 [33] => 192.168.100.33 [34] => 192.168.100.34 [35] => 192.168.100.35 [36] => 192.168.100.36 [37] => 192.168.100.37 [38] => 192.168.100.38 [39] => 192.168.100.39 [40] => 192.168.100.40 [41] => 192.168.100.41 [42] => 192.168.100.42 [43] => 192.168.100.43 [44] => 192.168.100.44 [45] => 192.168.100.45 [46] => 192.168.100.46 [47] => 192.168.100.47 [48] => 192.168.100.48 [49] => 192.168.100.49 [50] => 192.168.100.50 [51] => 192.168.100.51 [52] => 192.168.100.52 [53] => 192.168.100.53 [54] => 192.168.100.54 [55] => 192.168.100.55 [56] => 192.168.100.56 [57] => 192.168.100.57 [58] => 192.168.100.58 [59] => 192.168.100.59 [60] => 192.168.100.60 [61] => 192.168.100.61 [62] => 192.168.100.62 [63] => 192.168.100.63 [64] => 192.168.100.64 [65] => 192.168.100.65 [66] => 192.168.100.66 [67] => 192.168.100.67 [68] => 192.168.100.68 [69] => 192.168.100.69 [70] => 192.168.100.70 [71] => 192.168.100.71 [72] => 192.168.100.72 [73] => 192.168.100.73 [74] => 192.168.100.74 [75] => 192.168.100.75 [76] => 192.168.100.76 [77] => 192.168.100.77 [78] => 192.168.100.78 [79] => 192.168.100.79 [80] => 192.168.100.80 [81] => 192.168.100.81 [82] => 192.168.100.82 [83] => 192.168.100.83 [84] => 192.168.100.84 [85] => 192.168.100.85 [86] => 192.168.100.86 [87] => 192.168.100.87 [88] => 192.168.100.88 [89] => 192.168.100.89 [90] => 192.168.100.90 [91] => 192.168.100.91 [92] => 192.168.100.92 [93] => 192.168.100.93 [94] => 192.168.100.94 [95] => 192.168.100.95 [96] => 192.168.100.96 [97] => 192.168.100.97 [98] => 192.168.100.98 [99] => 192.168.100.99 [100] => 192.168.100.100 [101] => 192.168.100.101 [102] => 192.168.100.102 [103] => 192.168.100.103 [104] => 192.168.100.104 [105] => 192.168.100.105 [106] => 192.168.100.106 [107] => 192.168.100.107 [108] => 192.168.100.108 [109] => 192.168.100.109 [110] => 192.168.100.110 [111] => 192.168.100.111 [112] => 192.168.100.112 [113] => 192.168.100.113 [114] => 192.168.100.114 [115] => 192.168.100.115 [116] => 192.168.100.116 [117] => 192.168.100.117 [118] => 192.168.100.118 [119] => 192.168.100.119 [120] => 192.168.100.120 [121] => 192.168.100.121 [122] => 192.168.100.122 [123] => 192.168.100.123 [124] => 192.168.100.124 [125] => 192.168.100.125 [126] => 192.168.100.126 [127] => 192.168.100.127 [128] => 192.168.100.128 [129] => 192.168.100.129 [130] => 192.168.100.130 [131] => 192.168.100.131 [132] => 192.168.100.132 [133] => 192.168.100.133 [134] => 192.168.100.134 [135] => 192.168.100.135 [136] => 192.168.100.136 [137] => 192.168.100.137 [138] => 192.168.100.138 [139] => 192.168.100.139 [140] => 192.168.100.140 [141] => 192.168.100.141 [142] => 192.168.100.142 [143] => 192.168.100.143 [144] => 192.168.100.144 [145] => 192.168.100.145 [146] => 192.168.100.146 [147] => 192.168.100.147 [148] => 192.168.100.148 [149] => 192.168.100.149 [150] => 192.168.100.150 [151] => 192.168.100.151 [152] => 192.168.100.152 [153] => 192.168.100.153 [154] => 192.168.100.154 [155] => 192.168.100.155 [156] => 192.168.100.156 [157] => 192.168.100.157 [158] => 192.168.100.158 [159] => 192.168.100.159 [160] => 192.168.100.160 [161] => 192.168.100.161 [162] => 192.168.100.162 [163] => 192.168.100.163 [164] => 192.168.100.164 [165] => 192.168.100.165 [166] => 192.168.100.166 [167] => 192.168.100.167 [168] => 192.168.100.168 [169] => 192.168.100.169 [170] => 192.168.100.170 [171] => 192.168.100.171 [172] => 192.168.100.172 [173] => 192.168.100.173 [174] => 192.168.100.174 [175] => 192.168.100.175 [176] => 192.168.100.176 [177] => 192.168.100.177 [178] => 192.168.100.178 [179] => 192.168.100.179 [180] => 192.168.100.180 [181] => 192.168.100.181 [182] => 192.168.100.182 [183] => 192.168.100.183 [184] => 192.168.100.184 [185] => 192.168.100.185 [186] => 192.168.100.186 [187] => 192.168.100.187 [188] => 192.168.100.188 [189] => 192.168.100.189 [190] => 192.168.100.190 [191] => 192.168.100.191 [192] => 192.168.100.192 [193] => 192.168.100.193 [194] => 192.168.100.194 [195] => 192.168.100.195 [196] => 192.168.100.196 [197] => 192.168.100.197 [198] => 192.168.100.198 [199] => 192.168.100.199 [200] => 192.168.100.200 [201] => 192.168.100.201 [202] => 192.168.100.202 [203] => 192.168.100.203 [204] => 192.168.100.204 [205] => 192.168.100.205 [206] => 192.168.100.206 [207] => 192.168.100.207 [208] => 192.168.100.208 [209] => 192.168.100.209 [210] => 192.168.100.210 [211] => 192.168.100.211 [212] => 192.168.100.212 [213] => 192.168.100.213 [214] => 192.168.100.214 [215] => 192.168.100.215 [216] => 192.168.100.216 [217] => 192.168.100.217 [218] => 192.168.100.218 [219] => 192.168.100.219 [220] => 192.168.100.220 [221] => 192.168.100.221 [222] => 192.168.100.222 [223] => 192.168.100.223 [224] => 192.168.100.224 [225] => 192.168.100.225 [226] => 192.168.100.226 [227] => 192.168.100.227 [228] => 192.168.100.228 [229] => 192.168.100.229 [230] => 192.168.100.230 [231] => 192.168.100.231 [232] => 192.168.100.232 [233] => 192.168.100.233 [234] => 192.168.100.234 [235] => 192.168.100.235 [236] => 192.168.100.236 [237] => 192.168.100.237 [238] => 192.168.100.238 [239] => 192.168.100.239 [240] => 192.168.100.240 [241] => 192.168.100.241 [242] => 192.168.100.242 [243] => 192.168.100.243 [244] => 192.168.100.244 [245] => 192.168.100.245 [246] => 192.168.100.246 [247] => 192.168.100.247 [248] => 192.168.100.248 [249] => 192.168.100.249 [250] => 192.168.100.250 [251] => 192.168.100.251 [252] => 192.168.100.252 [253] => 192.168.100.253 [254] => 192.168.100.254 [255] => 192.168.100.255 [256] => 192.168.101.0 )
Output for 4.3.0 - 7.0.14
Array ( [0] => 192.168.100.0 [1] => 192.168.100.1 [2] => 192.168.100.2 [3] => 192.168.100.3 [4] => 192.168.100.4 [5] => 192.168.100.5 [6] => 192.168.100.6 [7] => 192.168.100.7 [8] => 192.168.100.8 [9] => 192.168.100.9 [10] => 192.168.100.10 [11] => 192.168.100.11 [12] => 192.168.100.12 [13] => 192.168.100.13 [14] => 192.168.100.14 [15] => 192.168.100.15 [16] => 192.168.100.16 [17] => 192.168.100.17 [18] => 192.168.100.18 [19] => 192.168.100.19 [20] => 192.168.100.20 [21] => 192.168.100.21 [22] => 192.168.100.22 [23] => 192.168.100.23 [24] => 192.168.100.24 [25] => 192.168.100.25 [26] => 192.168.100.26 [27] => 192.168.100.27 [28] => 192.168.100.28 [29] => 192.168.100.29 [30] => 192.168.100.30 [31] => 192.168.100.31 [32] => 192.168.100.32 [33] => 192.168.100.33 [34] => 192.168.100.34 [35] => 192.168.100.35 [36] => 192.168.100.36 [37] => 192.168.100.37 [38] => 192.168.100.38 [39] => 192.168.100.39 [40] => 192.168.100.40 [41] => 192.168.100.41 [42] => 192.168.100.42 [43] => 192.168.100.43 [44] => 192.168.100.44 [45] => 192.168.100.45 [46] => 192.168.100.46 [47] => 192.168.100.47 [48] => 192.168.100.48 [49] => 192.168.100.49 [50] => 192.168.100.50 [51] => 192.168.100.51 [52] => 192.168.100.52 [53] => 192.168.100.53 [54] => 192.168.100.54 [55] => 192.168.100.55 [56] => 192.168.100.56 [57] => 192.168.100.57 [58] => 192.168.100.58 [59] => 192.168.100.59 [60] => 192.168.100.60 [61] => 192.168.100.61 [62] => 192.168.100.62 [63] => 192.168.100.63 [64] => 192.168.100.64 [65] => 192.168.100.65 [66] => 192.168.100.66 [67] => 192.168.100.67 [68] => 192.168.100.68 [69] => 192.168.100.69 [70] => 192.168.100.70 [71] => 192.168.100.71 [72] => 192.168.100.72 [73] => 192.168.100.73 [74] => 192.168.100.74 [75] => 192.168.100.75 [76] => 192.168.100.76 [77] => 192.168.100.77 [78] => 192.168.100.78 [79] => 192.168.100.79 [80] => 192.168.100.80 [81] => 192.168.100.81 [82] => 192.168.100.82 [83] => 192.168.100.83 [84] => 192.168.100.84 [85] => 192.168.100.85 [86] => 192.168.100.86 [87] => 192.168.100.87 [88] => 192.168.100.88 [89] => 192.168.100.89 [90] => 192.168.100.90 [91] => 192.168.100.91 [92] => 192.168.100.92 [93] => 192.168.100.93 [94] => 192.168.100.94 [95] => 192.168.100.95 [96] => 192.168.100.96 [97] => 192.168.100.97 [98] => 192.168.100.98 [99] => 192.168.100.99 [100] => 192.168.100.100 [101] => 192.168.100.101 [102] => 192.168.100.102 [103] => 192.168.100.103 [104] => 192.168.100.104 [105] => 192.168.100.105 [106] => 192.168.100.106 [107] => 192.168.100.107 [108] => 192.168.100.108 [109] => 192.168.100.109 [110] => 192.168.100.110 [111] => 192.168.100.111 [112] => 192.168.100.112 [113] => 192.168.100.113 [114] => 192.168.100.114 [115] => 192.168.100.115 [116] => 192.168.100.116 [117] => 192.168.100.117 [118] => 192.168.100.118 [119] => 192.168.100.119 [120] => 192.168.100.120 [121] => 192.168.100.121 [122] => 192.168.100.122 [123] => 192.168.100.123 [124] => 192.168.100.124 [125] => 192.168.100.125 [126] => 192.168.100.126 [127] => 192.168.100.127 [128] => 192.168.100.128 [129] => 192.168.100.129 [130] => 192.168.100.130 [131] => 192.168.100.131 [132] => 192.168.100.132 [133] => 192.168.100.133 [134] => 192.168.100.134 [135] => 192.168.100.135 [136] => 192.168.100.136 [137] => 192.168.100.137 [138] => 192.168.100.138 [139] => 192.168.100.139 [140] => 192.168.100.140 [141] => 192.168.100.141 [142] => 192.168.100.142 [143] => 192.168.100.143 [144] => 192.168.100.144 [145] => 192.168.100.145 [146] => 192.168.100.146 [147] => 192.168.100.147 [148] => 192.168.100.148 [149] => 192.168.100.149 [150] => 192.168.100.150 [151] => 192.168.100.151 [152] => 192.168.100.152 [153] => 192.168.100.153 [154] => 192.168.100.154 [155] => 192.168.100.155 [156] => 192.168.100.156 [157] => 192.168.100.157 [158] => 192.168.100.158 [159] => 192.168.100.159 [160] => 192.168.100.160 [161] => 192.168.100.161 [162] => 192.168.100.162 [163] => 192.168.100.163 [164] => 192.168.100.164 [165] => 192.168.100.165 [166] => 192.168.100.166 [167] => 192.168.100.167 [168] => 192.168.100.168 [169] => 192.168.100.169 [170] => 192.168.100.170 [171] => 192.168.100.171 [172] => 192.168.100.172 [173] => 192.168.100.173 [174] => 192.168.100.174 [175] => 192.168.100.175 [176] => 192.168.100.176 [177] => 192.168.100.177 [178] => 192.168.100.178 [179] => 192.168.100.179 [180] => 192.168.100.180 [181] => 192.168.100.181 [182] => 192.168.100.182 [183] => 192.168.100.183 [184] => 192.168.100.184 [185] => 192.168.100.185 [186] => 192.168.100.186 [187] => 192.168.100.187 [188] => 192.168.100.188 [189] => 192.168.100.189 [190] => 192.168.100.190 [191] => 192.168.100.191 [192] => 192.168.100.192 [193] => 192.168.100.193 [194] => 192.168.100.194 [195] => 192.168.100.195 [196] => 192.168.100.196 [197] => 192.168.100.197 [198] => 192.168.100.198 [199] => 192.168.100.199 [200] => 192.168.100.200 [201] => 192.168.100.201 [202] => 192.168.100.202 [203] => 192.168.100.203 [204] => 192.168.100.204 [205] => 192.168.100.205 [206] => 192.168.100.206 [207] => 192.168.100.207 [208] => 192.168.100.208 [209] => 192.168.100.209 [210] => 192.168.100.210 [211] => 192.168.100.211 [212] => 192.168.100.212 [213] => 192.168.100.213 [214] => 192.168.100.214 [215] => 192.168.100.215 [216] => 192.168.100.216 [217] => 192.168.100.217 [218] => 192.168.100.218 [219] => 192.168.100.219 [220] => 192.168.100.220 [221] => 192.168.100.221 [222] => 192.168.100.222 [223] => 192.168.100.223 [224] => 192.168.100.224 [225] => 192.168.100.225 [226] => 192.168.100.226 [227] => 192.168.100.227 [228] => 192.168.100.228 [229] => 192.168.100.229 [230] => 192.168.100.230 [231] => 192.168.100.231 [232] => 192.168.100.232 [233] => 192.168.100.233 [234] => 192.168.100.234 [235] => 192.168.100.235 [236] => 192.168.100.236 [237] => 192.168.100.237 [238] => 192.168.100.238 [239] => 192.168.100.239 [240] => 192.168.100.240 [241] => 192.168.100.241 [242] => 192.168.100.242 [243] => 192.168.100.243 [244] => 192.168.100.244 [245] => 192.168.100.245 [246] => 192.168.100.246 [247] => 192.168.100.247 [248] => 192.168.100.248 [249] => 192.168.100.249 [250] => 192.168.100.250 [251] => 192.168.100.251 [252] => 192.168.100.252 [253] => 192.168.100.253 [254] => 192.168.100.254 [255] => 192.168.100.255 [256] => 192.168.101.0 )