bitwiseShiftLeft_basiclong_64bit.phpt 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590
  1. --TEST--
  2. Test << operator : 64bit long tests
  3. --SKIPIF--
  4. <?php
  5. if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
  6. ?>
  7. --FILE--
  8. <?php
  9. define("MAX_64Bit", 9223372036854775807);
  10. define("MAX_32Bit", 2147483647);
  11. define("MIN_64Bit", -9223372036854775807 - 1);
  12. define("MIN_32Bit", -2147483647 - 1);
  13. $longVals = array(
  14. MAX_64Bit, MIN_64Bit, MAX_32Bit, MIN_32Bit, MAX_64Bit - MAX_32Bit, MIN_64Bit - MIN_32Bit,
  15. MAX_32Bit + 1, MIN_32Bit - 1, MAX_32Bit * 2, (MAX_32Bit * 2) + 1, (MAX_32Bit * 2) - 1,
  16. MAX_64Bit -1, MAX_64Bit + 1, MIN_64Bit + 1, MIN_64Bit - 1
  17. );
  18. $otherVals = array(0, 1, -1, 7, 9, 65, -44, MAX_32Bit, MAX_64Bit);
  19. error_reporting(E_ERROR);
  20. foreach ($longVals as $longVal) {
  21. foreach($otherVals as $otherVal) {
  22. echo "--- testing: $longVal << $otherVal ---\n";
  23. try {
  24. var_dump($longVal<<$otherVal);
  25. } catch (ArithmeticError $e) {
  26. echo "Exception: " . $e->getMessage() . "\n";
  27. }
  28. }
  29. }
  30. foreach ($otherVals as $otherVal) {
  31. foreach($longVals as $longVal) {
  32. echo "--- testing: $otherVal << $longVal ---\n";
  33. try {
  34. var_dump($otherVal<<$longVal);
  35. } catch (ArithmeticError $e) {
  36. echo "Exception: " . $e->getMessage() . "\n";
  37. }
  38. }
  39. }
  40. ?>
  41. ===DONE===
  42. --EXPECT--
  43. --- testing: 9223372036854775807 << 0 ---
  44. int(9223372036854775807)
  45. --- testing: 9223372036854775807 << 1 ---
  46. int(-2)
  47. --- testing: 9223372036854775807 << -1 ---
  48. Exception: Bit shift by negative number
  49. --- testing: 9223372036854775807 << 7 ---
  50. int(-128)
  51. --- testing: 9223372036854775807 << 9 ---
  52. int(-512)
  53. --- testing: 9223372036854775807 << 65 ---
  54. int(0)
  55. --- testing: 9223372036854775807 << -44 ---
  56. Exception: Bit shift by negative number
  57. --- testing: 9223372036854775807 << 2147483647 ---
  58. int(0)
  59. --- testing: 9223372036854775807 << 9223372036854775807 ---
  60. int(0)
  61. --- testing: -9223372036854775808 << 0 ---
  62. int(-9223372036854775808)
  63. --- testing: -9223372036854775808 << 1 ---
  64. int(0)
  65. --- testing: -9223372036854775808 << -1 ---
  66. Exception: Bit shift by negative number
  67. --- testing: -9223372036854775808 << 7 ---
  68. int(0)
  69. --- testing: -9223372036854775808 << 9 ---
  70. int(0)
  71. --- testing: -9223372036854775808 << 65 ---
  72. int(0)
  73. --- testing: -9223372036854775808 << -44 ---
  74. Exception: Bit shift by negative number
  75. --- testing: -9223372036854775808 << 2147483647 ---
  76. int(0)
  77. --- testing: -9223372036854775808 << 9223372036854775807 ---
  78. int(0)
  79. --- testing: 2147483647 << 0 ---
  80. int(2147483647)
  81. --- testing: 2147483647 << 1 ---
  82. int(4294967294)
  83. --- testing: 2147483647 << -1 ---
  84. Exception: Bit shift by negative number
  85. --- testing: 2147483647 << 7 ---
  86. int(274877906816)
  87. --- testing: 2147483647 << 9 ---
  88. int(1099511627264)
  89. --- testing: 2147483647 << 65 ---
  90. int(0)
  91. --- testing: 2147483647 << -44 ---
  92. Exception: Bit shift by negative number
  93. --- testing: 2147483647 << 2147483647 ---
  94. int(0)
  95. --- testing: 2147483647 << 9223372036854775807 ---
  96. int(0)
  97. --- testing: -2147483648 << 0 ---
  98. int(-2147483648)
  99. --- testing: -2147483648 << 1 ---
  100. int(-4294967296)
  101. --- testing: -2147483648 << -1 ---
  102. Exception: Bit shift by negative number
  103. --- testing: -2147483648 << 7 ---
  104. int(-274877906944)
  105. --- testing: -2147483648 << 9 ---
  106. int(-1099511627776)
  107. --- testing: -2147483648 << 65 ---
  108. int(0)
  109. --- testing: -2147483648 << -44 ---
  110. Exception: Bit shift by negative number
  111. --- testing: -2147483648 << 2147483647 ---
  112. int(0)
  113. --- testing: -2147483648 << 9223372036854775807 ---
  114. int(0)
  115. --- testing: 9223372034707292160 << 0 ---
  116. int(9223372034707292160)
  117. --- testing: 9223372034707292160 << 1 ---
  118. int(-4294967296)
  119. --- testing: 9223372034707292160 << -1 ---
  120. Exception: Bit shift by negative number
  121. --- testing: 9223372034707292160 << 7 ---
  122. int(-274877906944)
  123. --- testing: 9223372034707292160 << 9 ---
  124. int(-1099511627776)
  125. --- testing: 9223372034707292160 << 65 ---
  126. int(0)
  127. --- testing: 9223372034707292160 << -44 ---
  128. Exception: Bit shift by negative number
  129. --- testing: 9223372034707292160 << 2147483647 ---
  130. int(0)
  131. --- testing: 9223372034707292160 << 9223372036854775807 ---
  132. int(0)
  133. --- testing: -9223372034707292160 << 0 ---
  134. int(-9223372034707292160)
  135. --- testing: -9223372034707292160 << 1 ---
  136. int(4294967296)
  137. --- testing: -9223372034707292160 << -1 ---
  138. Exception: Bit shift by negative number
  139. --- testing: -9223372034707292160 << 7 ---
  140. int(274877906944)
  141. --- testing: -9223372034707292160 << 9 ---
  142. int(1099511627776)
  143. --- testing: -9223372034707292160 << 65 ---
  144. int(0)
  145. --- testing: -9223372034707292160 << -44 ---
  146. Exception: Bit shift by negative number
  147. --- testing: -9223372034707292160 << 2147483647 ---
  148. int(0)
  149. --- testing: -9223372034707292160 << 9223372036854775807 ---
  150. int(0)
  151. --- testing: 2147483648 << 0 ---
  152. int(2147483648)
  153. --- testing: 2147483648 << 1 ---
  154. int(4294967296)
  155. --- testing: 2147483648 << -1 ---
  156. Exception: Bit shift by negative number
  157. --- testing: 2147483648 << 7 ---
  158. int(274877906944)
  159. --- testing: 2147483648 << 9 ---
  160. int(1099511627776)
  161. --- testing: 2147483648 << 65 ---
  162. int(0)
  163. --- testing: 2147483648 << -44 ---
  164. Exception: Bit shift by negative number
  165. --- testing: 2147483648 << 2147483647 ---
  166. int(0)
  167. --- testing: 2147483648 << 9223372036854775807 ---
  168. int(0)
  169. --- testing: -2147483649 << 0 ---
  170. int(-2147483649)
  171. --- testing: -2147483649 << 1 ---
  172. int(-4294967298)
  173. --- testing: -2147483649 << -1 ---
  174. Exception: Bit shift by negative number
  175. --- testing: -2147483649 << 7 ---
  176. int(-274877907072)
  177. --- testing: -2147483649 << 9 ---
  178. int(-1099511628288)
  179. --- testing: -2147483649 << 65 ---
  180. int(0)
  181. --- testing: -2147483649 << -44 ---
  182. Exception: Bit shift by negative number
  183. --- testing: -2147483649 << 2147483647 ---
  184. int(0)
  185. --- testing: -2147483649 << 9223372036854775807 ---
  186. int(0)
  187. --- testing: 4294967294 << 0 ---
  188. int(4294967294)
  189. --- testing: 4294967294 << 1 ---
  190. int(8589934588)
  191. --- testing: 4294967294 << -1 ---
  192. Exception: Bit shift by negative number
  193. --- testing: 4294967294 << 7 ---
  194. int(549755813632)
  195. --- testing: 4294967294 << 9 ---
  196. int(2199023254528)
  197. --- testing: 4294967294 << 65 ---
  198. int(0)
  199. --- testing: 4294967294 << -44 ---
  200. Exception: Bit shift by negative number
  201. --- testing: 4294967294 << 2147483647 ---
  202. int(0)
  203. --- testing: 4294967294 << 9223372036854775807 ---
  204. int(0)
  205. --- testing: 4294967295 << 0 ---
  206. int(4294967295)
  207. --- testing: 4294967295 << 1 ---
  208. int(8589934590)
  209. --- testing: 4294967295 << -1 ---
  210. Exception: Bit shift by negative number
  211. --- testing: 4294967295 << 7 ---
  212. int(549755813760)
  213. --- testing: 4294967295 << 9 ---
  214. int(2199023255040)
  215. --- testing: 4294967295 << 65 ---
  216. int(0)
  217. --- testing: 4294967295 << -44 ---
  218. Exception: Bit shift by negative number
  219. --- testing: 4294967295 << 2147483647 ---
  220. int(0)
  221. --- testing: 4294967295 << 9223372036854775807 ---
  222. int(0)
  223. --- testing: 4294967293 << 0 ---
  224. int(4294967293)
  225. --- testing: 4294967293 << 1 ---
  226. int(8589934586)
  227. --- testing: 4294967293 << -1 ---
  228. Exception: Bit shift by negative number
  229. --- testing: 4294967293 << 7 ---
  230. int(549755813504)
  231. --- testing: 4294967293 << 9 ---
  232. int(2199023254016)
  233. --- testing: 4294967293 << 65 ---
  234. int(0)
  235. --- testing: 4294967293 << -44 ---
  236. Exception: Bit shift by negative number
  237. --- testing: 4294967293 << 2147483647 ---
  238. int(0)
  239. --- testing: 4294967293 << 9223372036854775807 ---
  240. int(0)
  241. --- testing: 9223372036854775806 << 0 ---
  242. int(9223372036854775806)
  243. --- testing: 9223372036854775806 << 1 ---
  244. int(-4)
  245. --- testing: 9223372036854775806 << -1 ---
  246. Exception: Bit shift by negative number
  247. --- testing: 9223372036854775806 << 7 ---
  248. int(-256)
  249. --- testing: 9223372036854775806 << 9 ---
  250. int(-1024)
  251. --- testing: 9223372036854775806 << 65 ---
  252. int(0)
  253. --- testing: 9223372036854775806 << -44 ---
  254. Exception: Bit shift by negative number
  255. --- testing: 9223372036854775806 << 2147483647 ---
  256. int(0)
  257. --- testing: 9223372036854775806 << 9223372036854775807 ---
  258. int(0)
  259. --- testing: 9.2233720368548E+18 << 0 ---
  260. int(-9223372036854775808)
  261. --- testing: 9.2233720368548E+18 << 1 ---
  262. int(0)
  263. --- testing: 9.2233720368548E+18 << -1 ---
  264. Exception: Bit shift by negative number
  265. --- testing: 9.2233720368548E+18 << 7 ---
  266. int(0)
  267. --- testing: 9.2233720368548E+18 << 9 ---
  268. int(0)
  269. --- testing: 9.2233720368548E+18 << 65 ---
  270. int(0)
  271. --- testing: 9.2233720368548E+18 << -44 ---
  272. Exception: Bit shift by negative number
  273. --- testing: 9.2233720368548E+18 << 2147483647 ---
  274. int(0)
  275. --- testing: 9.2233720368548E+18 << 9223372036854775807 ---
  276. int(0)
  277. --- testing: -9223372036854775807 << 0 ---
  278. int(-9223372036854775807)
  279. --- testing: -9223372036854775807 << 1 ---
  280. int(2)
  281. --- testing: -9223372036854775807 << -1 ---
  282. Exception: Bit shift by negative number
  283. --- testing: -9223372036854775807 << 7 ---
  284. int(128)
  285. --- testing: -9223372036854775807 << 9 ---
  286. int(512)
  287. --- testing: -9223372036854775807 << 65 ---
  288. int(0)
  289. --- testing: -9223372036854775807 << -44 ---
  290. Exception: Bit shift by negative number
  291. --- testing: -9223372036854775807 << 2147483647 ---
  292. int(0)
  293. --- testing: -9223372036854775807 << 9223372036854775807 ---
  294. int(0)
  295. --- testing: -9.2233720368548E+18 << 0 ---
  296. int(-9223372036854775808)
  297. --- testing: -9.2233720368548E+18 << 1 ---
  298. int(0)
  299. --- testing: -9.2233720368548E+18 << -1 ---
  300. Exception: Bit shift by negative number
  301. --- testing: -9.2233720368548E+18 << 7 ---
  302. int(0)
  303. --- testing: -9.2233720368548E+18 << 9 ---
  304. int(0)
  305. --- testing: -9.2233720368548E+18 << 65 ---
  306. int(0)
  307. --- testing: -9.2233720368548E+18 << -44 ---
  308. Exception: Bit shift by negative number
  309. --- testing: -9.2233720368548E+18 << 2147483647 ---
  310. int(0)
  311. --- testing: -9.2233720368548E+18 << 9223372036854775807 ---
  312. int(0)
  313. --- testing: 0 << 9223372036854775807 ---
  314. int(0)
  315. --- testing: 0 << -9223372036854775808 ---
  316. Exception: Bit shift by negative number
  317. --- testing: 0 << 2147483647 ---
  318. int(0)
  319. --- testing: 0 << -2147483648 ---
  320. Exception: Bit shift by negative number
  321. --- testing: 0 << 9223372034707292160 ---
  322. int(0)
  323. --- testing: 0 << -9223372034707292160 ---
  324. Exception: Bit shift by negative number
  325. --- testing: 0 << 2147483648 ---
  326. int(0)
  327. --- testing: 0 << -2147483649 ---
  328. Exception: Bit shift by negative number
  329. --- testing: 0 << 4294967294 ---
  330. int(0)
  331. --- testing: 0 << 4294967295 ---
  332. int(0)
  333. --- testing: 0 << 4294967293 ---
  334. int(0)
  335. --- testing: 0 << 9223372036854775806 ---
  336. int(0)
  337. --- testing: 0 << 9.2233720368548E+18 ---
  338. Exception: Bit shift by negative number
  339. --- testing: 0 << -9223372036854775807 ---
  340. Exception: Bit shift by negative number
  341. --- testing: 0 << -9.2233720368548E+18 ---
  342. Exception: Bit shift by negative number
  343. --- testing: 1 << 9223372036854775807 ---
  344. int(0)
  345. --- testing: 1 << -9223372036854775808 ---
  346. Exception: Bit shift by negative number
  347. --- testing: 1 << 2147483647 ---
  348. int(0)
  349. --- testing: 1 << -2147483648 ---
  350. Exception: Bit shift by negative number
  351. --- testing: 1 << 9223372034707292160 ---
  352. int(0)
  353. --- testing: 1 << -9223372034707292160 ---
  354. Exception: Bit shift by negative number
  355. --- testing: 1 << 2147483648 ---
  356. int(0)
  357. --- testing: 1 << -2147483649 ---
  358. Exception: Bit shift by negative number
  359. --- testing: 1 << 4294967294 ---
  360. int(0)
  361. --- testing: 1 << 4294967295 ---
  362. int(0)
  363. --- testing: 1 << 4294967293 ---
  364. int(0)
  365. --- testing: 1 << 9223372036854775806 ---
  366. int(0)
  367. --- testing: 1 << 9.2233720368548E+18 ---
  368. Exception: Bit shift by negative number
  369. --- testing: 1 << -9223372036854775807 ---
  370. Exception: Bit shift by negative number
  371. --- testing: 1 << -9.2233720368548E+18 ---
  372. Exception: Bit shift by negative number
  373. --- testing: -1 << 9223372036854775807 ---
  374. int(0)
  375. --- testing: -1 << -9223372036854775808 ---
  376. Exception: Bit shift by negative number
  377. --- testing: -1 << 2147483647 ---
  378. int(0)
  379. --- testing: -1 << -2147483648 ---
  380. Exception: Bit shift by negative number
  381. --- testing: -1 << 9223372034707292160 ---
  382. int(0)
  383. --- testing: -1 << -9223372034707292160 ---
  384. Exception: Bit shift by negative number
  385. --- testing: -1 << 2147483648 ---
  386. int(0)
  387. --- testing: -1 << -2147483649 ---
  388. Exception: Bit shift by negative number
  389. --- testing: -1 << 4294967294 ---
  390. int(0)
  391. --- testing: -1 << 4294967295 ---
  392. int(0)
  393. --- testing: -1 << 4294967293 ---
  394. int(0)
  395. --- testing: -1 << 9223372036854775806 ---
  396. int(0)
  397. --- testing: -1 << 9.2233720368548E+18 ---
  398. Exception: Bit shift by negative number
  399. --- testing: -1 << -9223372036854775807 ---
  400. Exception: Bit shift by negative number
  401. --- testing: -1 << -9.2233720368548E+18 ---
  402. Exception: Bit shift by negative number
  403. --- testing: 7 << 9223372036854775807 ---
  404. int(0)
  405. --- testing: 7 << -9223372036854775808 ---
  406. Exception: Bit shift by negative number
  407. --- testing: 7 << 2147483647 ---
  408. int(0)
  409. --- testing: 7 << -2147483648 ---
  410. Exception: Bit shift by negative number
  411. --- testing: 7 << 9223372034707292160 ---
  412. int(0)
  413. --- testing: 7 << -9223372034707292160 ---
  414. Exception: Bit shift by negative number
  415. --- testing: 7 << 2147483648 ---
  416. int(0)
  417. --- testing: 7 << -2147483649 ---
  418. Exception: Bit shift by negative number
  419. --- testing: 7 << 4294967294 ---
  420. int(0)
  421. --- testing: 7 << 4294967295 ---
  422. int(0)
  423. --- testing: 7 << 4294967293 ---
  424. int(0)
  425. --- testing: 7 << 9223372036854775806 ---
  426. int(0)
  427. --- testing: 7 << 9.2233720368548E+18 ---
  428. Exception: Bit shift by negative number
  429. --- testing: 7 << -9223372036854775807 ---
  430. Exception: Bit shift by negative number
  431. --- testing: 7 << -9.2233720368548E+18 ---
  432. Exception: Bit shift by negative number
  433. --- testing: 9 << 9223372036854775807 ---
  434. int(0)
  435. --- testing: 9 << -9223372036854775808 ---
  436. Exception: Bit shift by negative number
  437. --- testing: 9 << 2147483647 ---
  438. int(0)
  439. --- testing: 9 << -2147483648 ---
  440. Exception: Bit shift by negative number
  441. --- testing: 9 << 9223372034707292160 ---
  442. int(0)
  443. --- testing: 9 << -9223372034707292160 ---
  444. Exception: Bit shift by negative number
  445. --- testing: 9 << 2147483648 ---
  446. int(0)
  447. --- testing: 9 << -2147483649 ---
  448. Exception: Bit shift by negative number
  449. --- testing: 9 << 4294967294 ---
  450. int(0)
  451. --- testing: 9 << 4294967295 ---
  452. int(0)
  453. --- testing: 9 << 4294967293 ---
  454. int(0)
  455. --- testing: 9 << 9223372036854775806 ---
  456. int(0)
  457. --- testing: 9 << 9.2233720368548E+18 ---
  458. Exception: Bit shift by negative number
  459. --- testing: 9 << -9223372036854775807 ---
  460. Exception: Bit shift by negative number
  461. --- testing: 9 << -9.2233720368548E+18 ---
  462. Exception: Bit shift by negative number
  463. --- testing: 65 << 9223372036854775807 ---
  464. int(0)
  465. --- testing: 65 << -9223372036854775808 ---
  466. Exception: Bit shift by negative number
  467. --- testing: 65 << 2147483647 ---
  468. int(0)
  469. --- testing: 65 << -2147483648 ---
  470. Exception: Bit shift by negative number
  471. --- testing: 65 << 9223372034707292160 ---
  472. int(0)
  473. --- testing: 65 << -9223372034707292160 ---
  474. Exception: Bit shift by negative number
  475. --- testing: 65 << 2147483648 ---
  476. int(0)
  477. --- testing: 65 << -2147483649 ---
  478. Exception: Bit shift by negative number
  479. --- testing: 65 << 4294967294 ---
  480. int(0)
  481. --- testing: 65 << 4294967295 ---
  482. int(0)
  483. --- testing: 65 << 4294967293 ---
  484. int(0)
  485. --- testing: 65 << 9223372036854775806 ---
  486. int(0)
  487. --- testing: 65 << 9.2233720368548E+18 ---
  488. Exception: Bit shift by negative number
  489. --- testing: 65 << -9223372036854775807 ---
  490. Exception: Bit shift by negative number
  491. --- testing: 65 << -9.2233720368548E+18 ---
  492. Exception: Bit shift by negative number
  493. --- testing: -44 << 9223372036854775807 ---
  494. int(0)
  495. --- testing: -44 << -9223372036854775808 ---
  496. Exception: Bit shift by negative number
  497. --- testing: -44 << 2147483647 ---
  498. int(0)
  499. --- testing: -44 << -2147483648 ---
  500. Exception: Bit shift by negative number
  501. --- testing: -44 << 9223372034707292160 ---
  502. int(0)
  503. --- testing: -44 << -9223372034707292160 ---
  504. Exception: Bit shift by negative number
  505. --- testing: -44 << 2147483648 ---
  506. int(0)
  507. --- testing: -44 << -2147483649 ---
  508. Exception: Bit shift by negative number
  509. --- testing: -44 << 4294967294 ---
  510. int(0)
  511. --- testing: -44 << 4294967295 ---
  512. int(0)
  513. --- testing: -44 << 4294967293 ---
  514. int(0)
  515. --- testing: -44 << 9223372036854775806 ---
  516. int(0)
  517. --- testing: -44 << 9.2233720368548E+18 ---
  518. Exception: Bit shift by negative number
  519. --- testing: -44 << -9223372036854775807 ---
  520. Exception: Bit shift by negative number
  521. --- testing: -44 << -9.2233720368548E+18 ---
  522. Exception: Bit shift by negative number
  523. --- testing: 2147483647 << 9223372036854775807 ---
  524. int(0)
  525. --- testing: 2147483647 << -9223372036854775808 ---
  526. Exception: Bit shift by negative number
  527. --- testing: 2147483647 << 2147483647 ---
  528. int(0)
  529. --- testing: 2147483647 << -2147483648 ---
  530. Exception: Bit shift by negative number
  531. --- testing: 2147483647 << 9223372034707292160 ---
  532. int(0)
  533. --- testing: 2147483647 << -9223372034707292160 ---
  534. Exception: Bit shift by negative number
  535. --- testing: 2147483647 << 2147483648 ---
  536. int(0)
  537. --- testing: 2147483647 << -2147483649 ---
  538. Exception: Bit shift by negative number
  539. --- testing: 2147483647 << 4294967294 ---
  540. int(0)
  541. --- testing: 2147483647 << 4294967295 ---
  542. int(0)
  543. --- testing: 2147483647 << 4294967293 ---
  544. int(0)
  545. --- testing: 2147483647 << 9223372036854775806 ---
  546. int(0)
  547. --- testing: 2147483647 << 9.2233720368548E+18 ---
  548. Exception: Bit shift by negative number
  549. --- testing: 2147483647 << -9223372036854775807 ---
  550. Exception: Bit shift by negative number
  551. --- testing: 2147483647 << -9.2233720368548E+18 ---
  552. Exception: Bit shift by negative number
  553. --- testing: 9223372036854775807 << 9223372036854775807 ---
  554. int(0)
  555. --- testing: 9223372036854775807 << -9223372036854775808 ---
  556. Exception: Bit shift by negative number
  557. --- testing: 9223372036854775807 << 2147483647 ---
  558. int(0)
  559. --- testing: 9223372036854775807 << -2147483648 ---
  560. Exception: Bit shift by negative number
  561. --- testing: 9223372036854775807 << 9223372034707292160 ---
  562. int(0)
  563. --- testing: 9223372036854775807 << -9223372034707292160 ---
  564. Exception: Bit shift by negative number
  565. --- testing: 9223372036854775807 << 2147483648 ---
  566. int(0)
  567. --- testing: 9223372036854775807 << -2147483649 ---
  568. Exception: Bit shift by negative number
  569. --- testing: 9223372036854775807 << 4294967294 ---
  570. int(0)
  571. --- testing: 9223372036854775807 << 4294967295 ---
  572. int(0)
  573. --- testing: 9223372036854775807 << 4294967293 ---
  574. int(0)
  575. --- testing: 9223372036854775807 << 9223372036854775806 ---
  576. int(0)
  577. --- testing: 9223372036854775807 << 9.2233720368548E+18 ---
  578. Exception: Bit shift by negative number
  579. --- testing: 9223372036854775807 << -9223372036854775807 ---
  580. Exception: Bit shift by negative number
  581. --- testing: 9223372036854775807 << -9.2233720368548E+18 ---
  582. Exception: Bit shift by negative number
  583. ===DONE===