1--TEST-- 2Test token_get_all() function : usage variations - with bitwise operators 3--EXTENSIONS-- 4tokenizer 5--FILE-- 6<?php 7/* 8 * Passing 'source' argument with different bitwise operators to test them for token 9 * << - T_SL(287) 10 * >> - T_SR(286) 11*/ 12 13echo "*** Testing token_get_all() : 'source' string with different bitwise operators ***\n"; 14 15// bitwise operators : '<<' , '>>' 16$source = '<?php 17$a = 2, $b = 4; 18$a = $a << 2; 19$b = $b >> 2; 20var_dump($a); 21var_dump($b); 22?>'; 23var_dump( token_get_all($source)); 24 25echo "Done" 26?> 27--EXPECTF-- 28*** Testing token_get_all() : 'source' string with different bitwise operators *** 29array(50) { 30 [0]=> 31 array(3) { 32 [0]=> 33 int(%d) 34 [1]=> 35 string(6) "<?php 36" 37 [2]=> 38 int(1) 39 } 40 [1]=> 41 array(3) { 42 [0]=> 43 int(%d) 44 [1]=> 45 string(2) "$a" 46 [2]=> 47 int(2) 48 } 49 [2]=> 50 array(3) { 51 [0]=> 52 int(%d) 53 [1]=> 54 string(1) " " 55 [2]=> 56 int(2) 57 } 58 [3]=> 59 string(1) "=" 60 [4]=> 61 array(3) { 62 [0]=> 63 int(%d) 64 [1]=> 65 string(1) " " 66 [2]=> 67 int(2) 68 } 69 [5]=> 70 array(3) { 71 [0]=> 72 int(%d) 73 [1]=> 74 string(1) "2" 75 [2]=> 76 int(2) 77 } 78 [6]=> 79 string(1) "," 80 [7]=> 81 array(3) { 82 [0]=> 83 int(%d) 84 [1]=> 85 string(1) " " 86 [2]=> 87 int(2) 88 } 89 [8]=> 90 array(3) { 91 [0]=> 92 int(%d) 93 [1]=> 94 string(2) "$b" 95 [2]=> 96 int(2) 97 } 98 [9]=> 99 array(3) { 100 [0]=> 101 int(%d) 102 [1]=> 103 string(1) " " 104 [2]=> 105 int(2) 106 } 107 [10]=> 108 string(1) "=" 109 [11]=> 110 array(3) { 111 [0]=> 112 int(%d) 113 [1]=> 114 string(1) " " 115 [2]=> 116 int(2) 117 } 118 [12]=> 119 array(3) { 120 [0]=> 121 int(%d) 122 [1]=> 123 string(1) "4" 124 [2]=> 125 int(2) 126 } 127 [13]=> 128 string(1) ";" 129 [14]=> 130 array(3) { 131 [0]=> 132 int(%d) 133 [1]=> 134 string(1) " 135" 136 [2]=> 137 int(2) 138 } 139 [15]=> 140 array(3) { 141 [0]=> 142 int(%d) 143 [1]=> 144 string(2) "$a" 145 [2]=> 146 int(%d) 147 } 148 [16]=> 149 array(3) { 150 [0]=> 151 int(%d) 152 [1]=> 153 string(1) " " 154 [2]=> 155 int(%d) 156 } 157 [17]=> 158 string(1) "=" 159 [18]=> 160 array(3) { 161 [0]=> 162 int(%d) 163 [1]=> 164 string(1) " " 165 [2]=> 166 int(%d) 167 } 168 [19]=> 169 array(3) { 170 [0]=> 171 int(%d) 172 [1]=> 173 string(2) "$a" 174 [2]=> 175 int(%d) 176 } 177 [20]=> 178 array(3) { 179 [0]=> 180 int(%d) 181 [1]=> 182 string(1) " " 183 [2]=> 184 int(%d) 185 } 186 [21]=> 187 array(3) { 188 [0]=> 189 int(%d) 190 [1]=> 191 string(2) "<<" 192 [2]=> 193 int(%d) 194 } 195 [22]=> 196 array(3) { 197 [0]=> 198 int(%d) 199 [1]=> 200 string(1) " " 201 [2]=> 202 int(%d) 203 } 204 [23]=> 205 array(3) { 206 [0]=> 207 int(%d) 208 [1]=> 209 string(1) "2" 210 [2]=> 211 int(%d) 212 } 213 [24]=> 214 string(1) ";" 215 [25]=> 216 array(3) { 217 [0]=> 218 int(%d) 219 [1]=> 220 string(1) " 221" 222 [2]=> 223 int(%d) 224 } 225 [26]=> 226 array(3) { 227 [0]=> 228 int(%d) 229 [1]=> 230 string(2) "$b" 231 [2]=> 232 int(4) 233 } 234 [27]=> 235 array(3) { 236 [0]=> 237 int(%d) 238 [1]=> 239 string(1) " " 240 [2]=> 241 int(4) 242 } 243 [28]=> 244 string(1) "=" 245 [29]=> 246 array(3) { 247 [0]=> 248 int(%d) 249 [1]=> 250 string(1) " " 251 [2]=> 252 int(4) 253 } 254 [30]=> 255 array(3) { 256 [0]=> 257 int(%d) 258 [1]=> 259 string(2) "$b" 260 [2]=> 261 int(4) 262 } 263 [31]=> 264 array(3) { 265 [0]=> 266 int(%d) 267 [1]=> 268 string(1) " " 269 [2]=> 270 int(4) 271 } 272 [32]=> 273 array(3) { 274 [0]=> 275 int(%d) 276 [1]=> 277 string(2) ">>" 278 [2]=> 279 int(4) 280 } 281 [33]=> 282 array(3) { 283 [0]=> 284 int(%d) 285 [1]=> 286 string(1) " " 287 [2]=> 288 int(4) 289 } 290 [34]=> 291 array(3) { 292 [0]=> 293 int(%d) 294 [1]=> 295 string(1) "2" 296 [2]=> 297 int(4) 298 } 299 [35]=> 300 string(1) ";" 301 [36]=> 302 array(3) { 303 [0]=> 304 int(%d) 305 [1]=> 306 string(1) " 307" 308 [2]=> 309 int(4) 310 } 311 [37]=> 312 array(3) { 313 [0]=> 314 int(%d) 315 [1]=> 316 string(8) "var_dump" 317 [2]=> 318 int(5) 319 } 320 [38]=> 321 string(1) "(" 322 [39]=> 323 array(3) { 324 [0]=> 325 int(%d) 326 [1]=> 327 string(2) "$a" 328 [2]=> 329 int(5) 330 } 331 [40]=> 332 string(1) ")" 333 [41]=> 334 string(1) ";" 335 [42]=> 336 array(3) { 337 [0]=> 338 int(%d) 339 [1]=> 340 string(1) " 341" 342 [2]=> 343 int(5) 344 } 345 [43]=> 346 array(3) { 347 [0]=> 348 int(%d) 349 [1]=> 350 string(8) "var_dump" 351 [2]=> 352 int(6) 353 } 354 [44]=> 355 string(1) "(" 356 [45]=> 357 array(3) { 358 [0]=> 359 int(%d) 360 [1]=> 361 string(2) "$b" 362 [2]=> 363 int(6) 364 } 365 [46]=> 366 string(1) ")" 367 [47]=> 368 string(1) ";" 369 [48]=> 370 array(3) { 371 [0]=> 372 int(%d) 373 [1]=> 374 string(1) " 375" 376 [2]=> 377 int(6) 378 } 379 [49]=> 380 array(3) { 381 [0]=> 382 int(%d) 383 [1]=> 384 string(2) "?>" 385 [2]=> 386 int(7) 387 } 388} 389Done 390