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