1--TEST--
2Test sizeof() function : usage variations - checking for infinite recursion in COUNT_RECURSIVE mode
3--FILE--
4<?php
5echo "*** Testing sizeof() : usage variations ***\n";
6
7echo "-- Testing sizeof() for infinite recursion with arrays as argument in COUNT_RECURSIVE mode --\n";
8
9$array2 = array ( "Hi", "Hello",@$a);
10$array3 = array( 'hi', 'hello');
11$a = array ( 1, @$array1, $array2, $array3);
12$array1 = array( array(1, 2), $a);
13$array4 = array( 100, @$array4);
14
15var_dump( sizeof($array1, COUNT_RECURSIVE) );
16echo "\n";
17var_dump( sizeof($array4, COUNT_RECURSIVE) );
18
19echo "Done";
20?>
21--EXPECT--
22*** Testing sizeof() : usage variations ***
23-- Testing sizeof() for infinite recursion with arrays as argument in COUNT_RECURSIVE mode --
24int(13)
25
26int(2)
27Done
28