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