array_slice.phpt 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419
  1. --TEST--
  2. Testing array_slice() function
  3. --FILE--
  4. <?php
  5. $var_array = array(
  6. array(),
  7. array(1,2,3,4,5,6,7,8,9),
  8. array("One", "Two", "Three", "Four", "Five"),
  9. array(6, "six", 7, "seven", 8, "eight", 9, "nine"),
  10. array( "a" => "aaa", "A" => "AAA", "c" => "ccc", "d" => "ddd", "e" => "eee"),
  11. array("1" => "one", "2" => "two", "3" => "three", "4" => "four", "5" => "five"),
  12. array(1 => "one", 2 => "two", 3 => 7, 4 => "four", 5 => "five"),
  13. array("f" => "fff", "1" => "one", 4 => 6, "" => "blank", 2 => "float", "F" => "FFF",
  14. "blank" => "", 3 => 3.7, 5 => 7, 6 => 8.6, '5' => "Five"),
  15. array(12, "name", 'age', '45'),
  16. array( array("oNe", "tWo", 4), array(10, 20, 30, 40, 50), array())
  17. );
  18. $num = 4;
  19. $str = "john";
  20. $counter = 1;
  21. foreach ($var_array as $sub_array)
  22. {
  23. /* variations with two arguments */
  24. /* offset values >, < and = 0 */
  25. echo"\n*** Iteration ".$counter." ***\n";
  26. echo"\n*** Variation with first two Arguments ***\n";
  27. var_dump ( array_slice($sub_array, 1) );
  28. var_dump ( array_slice($sub_array, 0) );
  29. var_dump ( array_slice($sub_array, -2) );
  30. /* variations with three arguments */
  31. /* offset value variations with length values */
  32. echo"\n*** Variation with first three Arguments ***\n";
  33. var_dump ( array_slice($sub_array, 1, 3) );
  34. var_dump ( array_slice($sub_array, 1, 0) );
  35. var_dump ( array_slice($sub_array, 1, -3) );
  36. var_dump ( array_slice($sub_array, 0, 3) );
  37. var_dump ( array_slice($sub_array, 0, 0) );
  38. var_dump ( array_slice($sub_array, 0, -3) );
  39. var_dump ( array_slice($sub_array, -2, 3) );
  40. var_dump ( array_slice($sub_array, -2, 0 ) );
  41. var_dump ( array_slice($sub_array, -2, -3) );
  42. /* variations with four arguments */
  43. /* offset value, length value and preserve_key values variation */
  44. echo"\n*** Variation with first two arguments with preserve_key value TRUE ***\n";
  45. var_dump ( array_slice($sub_array, 1, 3, true) );
  46. var_dump ( array_slice($sub_array, 1, 0, true) );
  47. var_dump ( array_slice($sub_array, 1, -3, true) );
  48. var_dump ( array_slice($sub_array, 0, 3, true) );
  49. var_dump ( array_slice($sub_array, 0, 0, true) );
  50. var_dump ( array_slice($sub_array, 0, -3, true) );
  51. var_dump ( array_slice($sub_array, -2, 3, true) );
  52. var_dump ( array_slice($sub_array, -2, 0, true) );
  53. var_dump ( array_slice($sub_array, -2, -3, true) );
  54. $counter++;
  55. }
  56. /* variation of offset and length to point to same element */
  57. echo"\n*** Typical Variation of offset and length Arguments ***\n";
  58. var_dump (array_slice($var_array[2], 1, -3, true) );
  59. var_dump (array_slice($var_array[2], 1, -3, false) );
  60. var_dump (array_slice($var_array[2], -3, -2, true) );
  61. var_dump (array_slice($var_array[2], -3, -2, false) );
  62. ?>
  63. --EXPECT--
  64. *** Iteration 1 ***
  65. *** Variation with first two Arguments ***
  66. array(0) {
  67. }
  68. array(0) {
  69. }
  70. array(0) {
  71. }
  72. *** Variation with first three Arguments ***
  73. array(0) {
  74. }
  75. array(0) {
  76. }
  77. array(0) {
  78. }
  79. array(0) {
  80. }
  81. array(0) {
  82. }
  83. array(0) {
  84. }
  85. array(0) {
  86. }
  87. array(0) {
  88. }
  89. array(0) {
  90. }
  91. *** Variation with first two arguments with preserve_key value TRUE ***
  92. array(0) {
  93. }
  94. array(0) {
  95. }
  96. array(0) {
  97. }
  98. array(0) {
  99. }
  100. array(0) {
  101. }
  102. array(0) {
  103. }
  104. array(0) {
  105. }
  106. array(0) {
  107. }
  108. array(0) {
  109. }
  110. *** Iteration 2 ***
  111. *** Variation with first two Arguments ***
  112. array(8) {
  113. [0]=>
  114. int(2)
  115. [1]=>
  116. int(3)
  117. [2]=>
  118. int(4)
  119. [3]=>
  120. int(5)
  121. [4]=>
  122. int(6)
  123. [5]=>
  124. int(7)
  125. [6]=>
  126. int(8)
  127. [7]=>
  128. int(9)
  129. }
  130. array(9) {
  131. [0]=>
  132. int(1)
  133. [1]=>
  134. int(2)
  135. [2]=>
  136. int(3)
  137. [3]=>
  138. int(4)
  139. [4]=>
  140. int(5)
  141. [5]=>
  142. int(6)
  143. [6]=>
  144. int(7)
  145. [7]=>
  146. int(8)
  147. [8]=>
  148. int(9)
  149. }
  150. array(2) {
  151. [0]=>
  152. int(8)
  153. [1]=>
  154. int(9)
  155. }
  156. *** Variation with first three Arguments ***
  157. array(3) {
  158. [0]=>
  159. int(2)
  160. [1]=>
  161. int(3)
  162. [2]=>
  163. int(4)
  164. }
  165. array(0) {
  166. }
  167. array(5) {
  168. [0]=>
  169. int(2)
  170. [1]=>
  171. int(3)
  172. [2]=>
  173. int(4)
  174. [3]=>
  175. int(5)
  176. [4]=>
  177. int(6)
  178. }
  179. array(3) {
  180. [0]=>
  181. int(1)
  182. [1]=>
  183. int(2)
  184. [2]=>
  185. int(3)
  186. }
  187. array(0) {
  188. }
  189. array(6) {
  190. [0]=>
  191. int(1)
  192. [1]=>
  193. int(2)
  194. [2]=>
  195. int(3)
  196. [3]=>
  197. int(4)
  198. [4]=>
  199. int(5)
  200. [5]=>
  201. int(6)
  202. }
  203. array(2) {
  204. [0]=>
  205. int(8)
  206. [1]=>
  207. int(9)
  208. }
  209. array(0) {
  210. }
  211. array(0) {
  212. }
  213. *** Variation with first two arguments with preserve_key value TRUE ***
  214. array(3) {
  215. [1]=>
  216. int(2)
  217. [2]=>
  218. int(3)
  219. [3]=>
  220. int(4)
  221. }
  222. array(0) {
  223. }
  224. array(5) {
  225. [1]=>
  226. int(2)
  227. [2]=>
  228. int(3)
  229. [3]=>
  230. int(4)
  231. [4]=>
  232. int(5)
  233. [5]=>
  234. int(6)
  235. }
  236. array(3) {
  237. [0]=>
  238. int(1)
  239. [1]=>
  240. int(2)
  241. [2]=>
  242. int(3)
  243. }
  244. array(0) {
  245. }
  246. array(6) {
  247. [0]=>
  248. int(1)
  249. [1]=>
  250. int(2)
  251. [2]=>
  252. int(3)
  253. [3]=>
  254. int(4)
  255. [4]=>
  256. int(5)
  257. [5]=>
  258. int(6)
  259. }
  260. array(2) {
  261. [7]=>
  262. int(8)
  263. [8]=>
  264. int(9)
  265. }
  266. array(0) {
  267. }
  268. array(0) {
  269. }
  270. *** Iteration 3 ***
  271. *** Variation with first two Arguments ***
  272. array(4) {
  273. [0]=>
  274. string(3) "Two"
  275. [1]=>
  276. string(5) "Three"
  277. [2]=>
  278. string(4) "Four"
  279. [3]=>
  280. string(4) "Five"
  281. }
  282. array(5) {
  283. [0]=>
  284. string(3) "One"
  285. [1]=>
  286. string(3) "Two"
  287. [2]=>
  288. string(5) "Three"
  289. [3]=>
  290. string(4) "Four"
  291. [4]=>
  292. string(4) "Five"
  293. }
  294. array(2) {
  295. [0]=>
  296. string(4) "Four"
  297. [1]=>
  298. string(4) "Five"
  299. }
  300. *** Variation with first three Arguments ***
  301. array(3) {
  302. [0]=>
  303. string(3) "Two"
  304. [1]=>
  305. string(5) "Three"
  306. [2]=>
  307. string(4) "Four"
  308. }
  309. array(0) {
  310. }
  311. array(1) {
  312. [0]=>
  313. string(3) "Two"
  314. }
  315. array(3) {
  316. [0]=>
  317. string(3) "One"
  318. [1]=>
  319. string(3) "Two"
  320. [2]=>
  321. string(5) "Three"
  322. }
  323. array(0) {
  324. }
  325. array(2) {
  326. [0]=>
  327. string(3) "One"
  328. [1]=>
  329. string(3) "Two"
  330. }
  331. array(2) {
  332. [0]=>
  333. string(4) "Four"
  334. [1]=>
  335. string(4) "Five"
  336. }
  337. array(0) {
  338. }
  339. array(0) {
  340. }
  341. *** Variation with first two arguments with preserve_key value TRUE ***
  342. array(3) {
  343. [1]=>
  344. string(3) "Two"
  345. [2]=>
  346. string(5) "Three"
  347. [3]=>
  348. string(4) "Four"
  349. }
  350. array(0) {
  351. }
  352. array(1) {
  353. [1]=>
  354. string(3) "Two"
  355. }
  356. array(3) {
  357. [0]=>
  358. string(3) "One"
  359. [1]=>
  360. string(3) "Two"
  361. [2]=>
  362. string(5) "Three"
  363. }
  364. array(0) {
  365. }
  366. array(2) {
  367. [0]=>
  368. string(3) "One"
  369. [1]=>
  370. string(3) "Two"
  371. }
  372. array(2) {
  373. [3]=>
  374. string(4) "Four"
  375. [4]=>
  376. string(4) "Five"
  377. }
  378. array(0) {
  379. }
  380. array(0) {
  381. }
  382. *** Iteration 4 ***
  383. *** Variation with first two Arguments ***
  384. array(7) {
  385. [0]=>
  386. string(3) "six"
  387. [1]=>
  388. int(7)
  389. [2]=>
  390. string(5) "seven"
  391. [3]=>
  392. int(8)
  393. [4]=>
  394. string(5) "eight"
  395. [5]=>
  396. int(9)
  397. [6]=>
  398. string(4) "nine"
  399. }
  400. array(8) {
  401. [0]=>
  402. int(6)
  403. [1]=>
  404. string(3) "six"
  405. [2]=>
  406. int(7)
  407. [3]=>
  408. string(5) "seven"
  409. [4]=>
  410. int(8)
  411. [5]=>
  412. string(5) "eight"
  413. [6]=>
  414. int(9)
  415. [7]=>
  416. string(4) "nine"
  417. }
  418. array(2) {
  419. [0]=>
  420. int(9)
  421. [1]=>
  422. string(4) "nine"
  423. }
  424. *** Variation with first three Arguments ***
  425. array(3) {
  426. [0]=>
  427. string(3) "six"
  428. [1]=>
  429. int(7)
  430. [2]=>
  431. string(5) "seven"
  432. }
  433. array(0) {
  434. }
  435. array(4) {
  436. [0]=>
  437. string(3) "six"
  438. [1]=>
  439. int(7)
  440. [2]=>
  441. string(5) "seven"
  442. [3]=>
  443. int(8)
  444. }
  445. array(3) {
  446. [0]=>
  447. int(6)
  448. [1]=>
  449. string(3) "six"
  450. [2]=>
  451. int(7)
  452. }
  453. array(0) {
  454. }
  455. array(5) {
  456. [0]=>
  457. int(6)
  458. [1]=>
  459. string(3) "six"
  460. [2]=>
  461. int(7)
  462. [3]=>
  463. string(5) "seven"
  464. [4]=>
  465. int(8)
  466. }
  467. array(2) {
  468. [0]=>
  469. int(9)
  470. [1]=>
  471. string(4) "nine"
  472. }
  473. array(0) {
  474. }
  475. array(0) {
  476. }
  477. *** Variation with first two arguments with preserve_key value TRUE ***
  478. array(3) {
  479. [1]=>
  480. string(3) "six"
  481. [2]=>
  482. int(7)
  483. [3]=>
  484. string(5) "seven"
  485. }
  486. array(0) {
  487. }
  488. array(4) {
  489. [1]=>
  490. string(3) "six"
  491. [2]=>
  492. int(7)
  493. [3]=>
  494. string(5) "seven"
  495. [4]=>
  496. int(8)
  497. }
  498. array(3) {
  499. [0]=>
  500. int(6)
  501. [1]=>
  502. string(3) "six"
  503. [2]=>
  504. int(7)
  505. }
  506. array(0) {
  507. }
  508. array(5) {
  509. [0]=>
  510. int(6)
  511. [1]=>
  512. string(3) "six"
  513. [2]=>
  514. int(7)
  515. [3]=>
  516. string(5) "seven"
  517. [4]=>
  518. int(8)
  519. }
  520. array(2) {
  521. [6]=>
  522. int(9)
  523. [7]=>
  524. string(4) "nine"
  525. }
  526. array(0) {
  527. }
  528. array(0) {
  529. }
  530. *** Iteration 5 ***
  531. *** Variation with first two Arguments ***
  532. array(4) {
  533. ["A"]=>
  534. string(3) "AAA"
  535. ["c"]=>
  536. string(3) "ccc"
  537. ["d"]=>
  538. string(3) "ddd"
  539. ["e"]=>
  540. string(3) "eee"
  541. }
  542. array(5) {
  543. ["a"]=>
  544. string(3) "aaa"
  545. ["A"]=>
  546. string(3) "AAA"
  547. ["c"]=>
  548. string(3) "ccc"
  549. ["d"]=>
  550. string(3) "ddd"
  551. ["e"]=>
  552. string(3) "eee"
  553. }
  554. array(2) {
  555. ["d"]=>
  556. string(3) "ddd"
  557. ["e"]=>
  558. string(3) "eee"
  559. }
  560. *** Variation with first three Arguments ***
  561. array(3) {
  562. ["A"]=>
  563. string(3) "AAA"
  564. ["c"]=>
  565. string(3) "ccc"
  566. ["d"]=>
  567. string(3) "ddd"
  568. }
  569. array(0) {
  570. }
  571. array(1) {
  572. ["A"]=>
  573. string(3) "AAA"
  574. }
  575. array(3) {
  576. ["a"]=>
  577. string(3) "aaa"
  578. ["A"]=>
  579. string(3) "AAA"
  580. ["c"]=>
  581. string(3) "ccc"
  582. }
  583. array(0) {
  584. }
  585. array(2) {
  586. ["a"]=>
  587. string(3) "aaa"
  588. ["A"]=>
  589. string(3) "AAA"
  590. }
  591. array(2) {
  592. ["d"]=>
  593. string(3) "ddd"
  594. ["e"]=>
  595. string(3) "eee"
  596. }
  597. array(0) {
  598. }
  599. array(0) {
  600. }
  601. *** Variation with first two arguments with preserve_key value TRUE ***
  602. array(3) {
  603. ["A"]=>
  604. string(3) "AAA"
  605. ["c"]=>
  606. string(3) "ccc"
  607. ["d"]=>
  608. string(3) "ddd"
  609. }
  610. array(0) {
  611. }
  612. array(1) {
  613. ["A"]=>
  614. string(3) "AAA"
  615. }
  616. array(3) {
  617. ["a"]=>
  618. string(3) "aaa"
  619. ["A"]=>
  620. string(3) "AAA"
  621. ["c"]=>
  622. string(3) "ccc"
  623. }
  624. array(0) {
  625. }
  626. array(2) {
  627. ["a"]=>
  628. string(3) "aaa"
  629. ["A"]=>
  630. string(3) "AAA"
  631. }
  632. array(2) {
  633. ["d"]=>
  634. string(3) "ddd"
  635. ["e"]=>
  636. string(3) "eee"
  637. }
  638. array(0) {
  639. }
  640. array(0) {
  641. }
  642. *** Iteration 6 ***
  643. *** Variation with first two Arguments ***
  644. array(4) {
  645. [0]=>
  646. string(3) "two"
  647. [1]=>
  648. string(5) "three"
  649. [2]=>
  650. string(4) "four"
  651. [3]=>
  652. string(4) "five"
  653. }
  654. array(5) {
  655. [0]=>
  656. string(3) "one"
  657. [1]=>
  658. string(3) "two"
  659. [2]=>
  660. string(5) "three"
  661. [3]=>
  662. string(4) "four"
  663. [4]=>
  664. string(4) "five"
  665. }
  666. array(2) {
  667. [0]=>
  668. string(4) "four"
  669. [1]=>
  670. string(4) "five"
  671. }
  672. *** Variation with first three Arguments ***
  673. array(3) {
  674. [0]=>
  675. string(3) "two"
  676. [1]=>
  677. string(5) "three"
  678. [2]=>
  679. string(4) "four"
  680. }
  681. array(0) {
  682. }
  683. array(1) {
  684. [0]=>
  685. string(3) "two"
  686. }
  687. array(3) {
  688. [0]=>
  689. string(3) "one"
  690. [1]=>
  691. string(3) "two"
  692. [2]=>
  693. string(5) "three"
  694. }
  695. array(0) {
  696. }
  697. array(2) {
  698. [0]=>
  699. string(3) "one"
  700. [1]=>
  701. string(3) "two"
  702. }
  703. array(2) {
  704. [0]=>
  705. string(4) "four"
  706. [1]=>
  707. string(4) "five"
  708. }
  709. array(0) {
  710. }
  711. array(0) {
  712. }
  713. *** Variation with first two arguments with preserve_key value TRUE ***
  714. array(3) {
  715. [2]=>
  716. string(3) "two"
  717. [3]=>
  718. string(5) "three"
  719. [4]=>
  720. string(4) "four"
  721. }
  722. array(0) {
  723. }
  724. array(1) {
  725. [2]=>
  726. string(3) "two"
  727. }
  728. array(3) {
  729. [1]=>
  730. string(3) "one"
  731. [2]=>
  732. string(3) "two"
  733. [3]=>
  734. string(5) "three"
  735. }
  736. array(0) {
  737. }
  738. array(2) {
  739. [1]=>
  740. string(3) "one"
  741. [2]=>
  742. string(3) "two"
  743. }
  744. array(2) {
  745. [4]=>
  746. string(4) "four"
  747. [5]=>
  748. string(4) "five"
  749. }
  750. array(0) {
  751. }
  752. array(0) {
  753. }
  754. *** Iteration 7 ***
  755. *** Variation with first two Arguments ***
  756. array(4) {
  757. [0]=>
  758. string(3) "two"
  759. [1]=>
  760. int(7)
  761. [2]=>
  762. string(4) "four"
  763. [3]=>
  764. string(4) "five"
  765. }
  766. array(5) {
  767. [0]=>
  768. string(3) "one"
  769. [1]=>
  770. string(3) "two"
  771. [2]=>
  772. int(7)
  773. [3]=>
  774. string(4) "four"
  775. [4]=>
  776. string(4) "five"
  777. }
  778. array(2) {
  779. [0]=>
  780. string(4) "four"
  781. [1]=>
  782. string(4) "five"
  783. }
  784. *** Variation with first three Arguments ***
  785. array(3) {
  786. [0]=>
  787. string(3) "two"
  788. [1]=>
  789. int(7)
  790. [2]=>
  791. string(4) "four"
  792. }
  793. array(0) {
  794. }
  795. array(1) {
  796. [0]=>
  797. string(3) "two"
  798. }
  799. array(3) {
  800. [0]=>
  801. string(3) "one"
  802. [1]=>
  803. string(3) "two"
  804. [2]=>
  805. int(7)
  806. }
  807. array(0) {
  808. }
  809. array(2) {
  810. [0]=>
  811. string(3) "one"
  812. [1]=>
  813. string(3) "two"
  814. }
  815. array(2) {
  816. [0]=>
  817. string(4) "four"
  818. [1]=>
  819. string(4) "five"
  820. }
  821. array(0) {
  822. }
  823. array(0) {
  824. }
  825. *** Variation with first two arguments with preserve_key value TRUE ***
  826. array(3) {
  827. [2]=>
  828. string(3) "two"
  829. [3]=>
  830. int(7)
  831. [4]=>
  832. string(4) "four"
  833. }
  834. array(0) {
  835. }
  836. array(1) {
  837. [2]=>
  838. string(3) "two"
  839. }
  840. array(3) {
  841. [1]=>
  842. string(3) "one"
  843. [2]=>
  844. string(3) "two"
  845. [3]=>
  846. int(7)
  847. }
  848. array(0) {
  849. }
  850. array(2) {
  851. [1]=>
  852. string(3) "one"
  853. [2]=>
  854. string(3) "two"
  855. }
  856. array(2) {
  857. [4]=>
  858. string(4) "four"
  859. [5]=>
  860. string(4) "five"
  861. }
  862. array(0) {
  863. }
  864. array(0) {
  865. }
  866. *** Iteration 8 ***
  867. *** Variation with first two Arguments ***
  868. array(9) {
  869. [0]=>
  870. string(3) "one"
  871. [1]=>
  872. int(6)
  873. [""]=>
  874. string(5) "blank"
  875. [2]=>
  876. string(5) "float"
  877. ["F"]=>
  878. string(3) "FFF"
  879. ["blank"]=>
  880. string(0) ""
  881. [3]=>
  882. float(3.7)
  883. [4]=>
  884. string(4) "Five"
  885. [5]=>
  886. float(8.6)
  887. }
  888. array(10) {
  889. ["f"]=>
  890. string(3) "fff"
  891. [0]=>
  892. string(3) "one"
  893. [1]=>
  894. int(6)
  895. [""]=>
  896. string(5) "blank"
  897. [2]=>
  898. string(5) "float"
  899. ["F"]=>
  900. string(3) "FFF"
  901. ["blank"]=>
  902. string(0) ""
  903. [3]=>
  904. float(3.7)
  905. [4]=>
  906. string(4) "Five"
  907. [5]=>
  908. float(8.6)
  909. }
  910. array(2) {
  911. [0]=>
  912. string(4) "Five"
  913. [1]=>
  914. float(8.6)
  915. }
  916. *** Variation with first three Arguments ***
  917. array(3) {
  918. [0]=>
  919. string(3) "one"
  920. [1]=>
  921. int(6)
  922. [""]=>
  923. string(5) "blank"
  924. }
  925. array(0) {
  926. }
  927. array(6) {
  928. [0]=>
  929. string(3) "one"
  930. [1]=>
  931. int(6)
  932. [""]=>
  933. string(5) "blank"
  934. [2]=>
  935. string(5) "float"
  936. ["F"]=>
  937. string(3) "FFF"
  938. ["blank"]=>
  939. string(0) ""
  940. }
  941. array(3) {
  942. ["f"]=>
  943. string(3) "fff"
  944. [0]=>
  945. string(3) "one"
  946. [1]=>
  947. int(6)
  948. }
  949. array(0) {
  950. }
  951. array(7) {
  952. ["f"]=>
  953. string(3) "fff"
  954. [0]=>
  955. string(3) "one"
  956. [1]=>
  957. int(6)
  958. [""]=>
  959. string(5) "blank"
  960. [2]=>
  961. string(5) "float"
  962. ["F"]=>
  963. string(3) "FFF"
  964. ["blank"]=>
  965. string(0) ""
  966. }
  967. array(2) {
  968. [0]=>
  969. string(4) "Five"
  970. [1]=>
  971. float(8.6)
  972. }
  973. array(0) {
  974. }
  975. array(0) {
  976. }
  977. *** Variation with first two arguments with preserve_key value TRUE ***
  978. array(3) {
  979. [1]=>
  980. string(3) "one"
  981. [4]=>
  982. int(6)
  983. [""]=>
  984. string(5) "blank"
  985. }
  986. array(0) {
  987. }
  988. array(6) {
  989. [1]=>
  990. string(3) "one"
  991. [4]=>
  992. int(6)
  993. [""]=>
  994. string(5) "blank"
  995. [2]=>
  996. string(5) "float"
  997. ["F"]=>
  998. string(3) "FFF"
  999. ["blank"]=>
  1000. string(0) ""
  1001. }
  1002. array(3) {
  1003. ["f"]=>
  1004. string(3) "fff"
  1005. [1]=>
  1006. string(3) "one"
  1007. [4]=>
  1008. int(6)
  1009. }
  1010. array(0) {
  1011. }
  1012. array(7) {
  1013. ["f"]=>
  1014. string(3) "fff"
  1015. [1]=>
  1016. string(3) "one"
  1017. [4]=>
  1018. int(6)
  1019. [""]=>
  1020. string(5) "blank"
  1021. [2]=>
  1022. string(5) "float"
  1023. ["F"]=>
  1024. string(3) "FFF"
  1025. ["blank"]=>
  1026. string(0) ""
  1027. }
  1028. array(2) {
  1029. [5]=>
  1030. string(4) "Five"
  1031. [6]=>
  1032. float(8.6)
  1033. }
  1034. array(0) {
  1035. }
  1036. array(0) {
  1037. }
  1038. *** Iteration 9 ***
  1039. *** Variation with first two Arguments ***
  1040. array(3) {
  1041. [0]=>
  1042. string(4) "name"
  1043. [1]=>
  1044. string(3) "age"
  1045. [2]=>
  1046. string(2) "45"
  1047. }
  1048. array(4) {
  1049. [0]=>
  1050. int(12)
  1051. [1]=>
  1052. string(4) "name"
  1053. [2]=>
  1054. string(3) "age"
  1055. [3]=>
  1056. string(2) "45"
  1057. }
  1058. array(2) {
  1059. [0]=>
  1060. string(3) "age"
  1061. [1]=>
  1062. string(2) "45"
  1063. }
  1064. *** Variation with first three Arguments ***
  1065. array(3) {
  1066. [0]=>
  1067. string(4) "name"
  1068. [1]=>
  1069. string(3) "age"
  1070. [2]=>
  1071. string(2) "45"
  1072. }
  1073. array(0) {
  1074. }
  1075. array(0) {
  1076. }
  1077. array(3) {
  1078. [0]=>
  1079. int(12)
  1080. [1]=>
  1081. string(4) "name"
  1082. [2]=>
  1083. string(3) "age"
  1084. }
  1085. array(0) {
  1086. }
  1087. array(1) {
  1088. [0]=>
  1089. int(12)
  1090. }
  1091. array(2) {
  1092. [0]=>
  1093. string(3) "age"
  1094. [1]=>
  1095. string(2) "45"
  1096. }
  1097. array(0) {
  1098. }
  1099. array(0) {
  1100. }
  1101. *** Variation with first two arguments with preserve_key value TRUE ***
  1102. array(3) {
  1103. [1]=>
  1104. string(4) "name"
  1105. [2]=>
  1106. string(3) "age"
  1107. [3]=>
  1108. string(2) "45"
  1109. }
  1110. array(0) {
  1111. }
  1112. array(0) {
  1113. }
  1114. array(3) {
  1115. [0]=>
  1116. int(12)
  1117. [1]=>
  1118. string(4) "name"
  1119. [2]=>
  1120. string(3) "age"
  1121. }
  1122. array(0) {
  1123. }
  1124. array(1) {
  1125. [0]=>
  1126. int(12)
  1127. }
  1128. array(2) {
  1129. [2]=>
  1130. string(3) "age"
  1131. [3]=>
  1132. string(2) "45"
  1133. }
  1134. array(0) {
  1135. }
  1136. array(0) {
  1137. }
  1138. *** Iteration 10 ***
  1139. *** Variation with first two Arguments ***
  1140. array(2) {
  1141. [0]=>
  1142. array(5) {
  1143. [0]=>
  1144. int(10)
  1145. [1]=>
  1146. int(20)
  1147. [2]=>
  1148. int(30)
  1149. [3]=>
  1150. int(40)
  1151. [4]=>
  1152. int(50)
  1153. }
  1154. [1]=>
  1155. array(0) {
  1156. }
  1157. }
  1158. array(3) {
  1159. [0]=>
  1160. array(3) {
  1161. [0]=>
  1162. string(3) "oNe"
  1163. [1]=>
  1164. string(3) "tWo"
  1165. [2]=>
  1166. int(4)
  1167. }
  1168. [1]=>
  1169. array(5) {
  1170. [0]=>
  1171. int(10)
  1172. [1]=>
  1173. int(20)
  1174. [2]=>
  1175. int(30)
  1176. [3]=>
  1177. int(40)
  1178. [4]=>
  1179. int(50)
  1180. }
  1181. [2]=>
  1182. array(0) {
  1183. }
  1184. }
  1185. array(2) {
  1186. [0]=>
  1187. array(5) {
  1188. [0]=>
  1189. int(10)
  1190. [1]=>
  1191. int(20)
  1192. [2]=>
  1193. int(30)
  1194. [3]=>
  1195. int(40)
  1196. [4]=>
  1197. int(50)
  1198. }
  1199. [1]=>
  1200. array(0) {
  1201. }
  1202. }
  1203. *** Variation with first three Arguments ***
  1204. array(2) {
  1205. [0]=>
  1206. array(5) {
  1207. [0]=>
  1208. int(10)
  1209. [1]=>
  1210. int(20)
  1211. [2]=>
  1212. int(30)
  1213. [3]=>
  1214. int(40)
  1215. [4]=>
  1216. int(50)
  1217. }
  1218. [1]=>
  1219. array(0) {
  1220. }
  1221. }
  1222. array(0) {
  1223. }
  1224. array(0) {
  1225. }
  1226. array(3) {
  1227. [0]=>
  1228. array(3) {
  1229. [0]=>
  1230. string(3) "oNe"
  1231. [1]=>
  1232. string(3) "tWo"
  1233. [2]=>
  1234. int(4)
  1235. }
  1236. [1]=>
  1237. array(5) {
  1238. [0]=>
  1239. int(10)
  1240. [1]=>
  1241. int(20)
  1242. [2]=>
  1243. int(30)
  1244. [3]=>
  1245. int(40)
  1246. [4]=>
  1247. int(50)
  1248. }
  1249. [2]=>
  1250. array(0) {
  1251. }
  1252. }
  1253. array(0) {
  1254. }
  1255. array(0) {
  1256. }
  1257. array(2) {
  1258. [0]=>
  1259. array(5) {
  1260. [0]=>
  1261. int(10)
  1262. [1]=>
  1263. int(20)
  1264. [2]=>
  1265. int(30)
  1266. [3]=>
  1267. int(40)
  1268. [4]=>
  1269. int(50)
  1270. }
  1271. [1]=>
  1272. array(0) {
  1273. }
  1274. }
  1275. array(0) {
  1276. }
  1277. array(0) {
  1278. }
  1279. *** Variation with first two arguments with preserve_key value TRUE ***
  1280. array(2) {
  1281. [1]=>
  1282. array(5) {
  1283. [0]=>
  1284. int(10)
  1285. [1]=>
  1286. int(20)
  1287. [2]=>
  1288. int(30)
  1289. [3]=>
  1290. int(40)
  1291. [4]=>
  1292. int(50)
  1293. }
  1294. [2]=>
  1295. array(0) {
  1296. }
  1297. }
  1298. array(0) {
  1299. }
  1300. array(0) {
  1301. }
  1302. array(3) {
  1303. [0]=>
  1304. array(3) {
  1305. [0]=>
  1306. string(3) "oNe"
  1307. [1]=>
  1308. string(3) "tWo"
  1309. [2]=>
  1310. int(4)
  1311. }
  1312. [1]=>
  1313. array(5) {
  1314. [0]=>
  1315. int(10)
  1316. [1]=>
  1317. int(20)
  1318. [2]=>
  1319. int(30)
  1320. [3]=>
  1321. int(40)
  1322. [4]=>
  1323. int(50)
  1324. }
  1325. [2]=>
  1326. array(0) {
  1327. }
  1328. }
  1329. array(0) {
  1330. }
  1331. array(0) {
  1332. }
  1333. array(2) {
  1334. [1]=>
  1335. array(5) {
  1336. [0]=>
  1337. int(10)
  1338. [1]=>
  1339. int(20)
  1340. [2]=>
  1341. int(30)
  1342. [3]=>
  1343. int(40)
  1344. [4]=>
  1345. int(50)
  1346. }
  1347. [2]=>
  1348. array(0) {
  1349. }
  1350. }
  1351. array(0) {
  1352. }
  1353. array(0) {
  1354. }
  1355. *** Typical Variation of offset and length Arguments ***
  1356. array(1) {
  1357. [1]=>
  1358. string(3) "Two"
  1359. }
  1360. array(1) {
  1361. [0]=>
  1362. string(3) "Two"
  1363. }
  1364. array(1) {
  1365. [2]=>
  1366. string(5) "Three"
  1367. }
  1368. array(1) {
  1369. [0]=>
  1370. string(5) "Three"
  1371. }