From fb2ebbf23e42528bca95f94318323ccb99dedef0 Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Tue, 29 May 2007 12:42:19 +0000 Subject: [PATCH] fix tests, add 64bit versions --- .../debug_zval_dump_b_64bit.phpt | Bin 0 -> 13995 bytes .../tests/general_functions/intval.phpt | 4 + .../tests/general_functions/is_float.phpt | 4 + .../general_functions/is_float_64bit.phpt | 443 +++ .../tests/general_functions/is_int.phpt | 4 + .../tests/general_functions/is_int_64bit.phpt | 468 +++ .../general_functions/print_r_64bit.phpt | 1740 ++++++++ .../general_functions/var_dump_64bit.phpt | 3533 +++++++++++++++++ 8 files changed, 6196 insertions(+) create mode 100644 ext/standard/tests/general_functions/debug_zval_dump_b_64bit.phpt create mode 100644 ext/standard/tests/general_functions/is_float_64bit.phpt create mode 100644 ext/standard/tests/general_functions/is_int_64bit.phpt create mode 100644 ext/standard/tests/general_functions/print_r_64bit.phpt create mode 100644 ext/standard/tests/general_functions/var_dump_64bit.phpt diff --git a/ext/standard/tests/general_functions/debug_zval_dump_b_64bit.phpt b/ext/standard/tests/general_functions/debug_zval_dump_b_64bit.phpt new file mode 100644 index 0000000000000000000000000000000000000000..4f1cf957f30269520fc6959da565a7ffd2791244 GIT binary patch literal 13995 zcmeHNZExE+67JXfSMY>wZ6}c{*|ME9mo5%l7Z+^N3oa>exb?x1WjYqtkqk-hHe2Ms z@61pyq)0jLUR&JmIR#{iGkj(^oEehC+V;)l`o^|fH$2VQg3q_NvtK{>>)B#^x9N1* zavKF%7)R_SoBL@Puz150A6wFvZD0R*d3E^)djIwN&1%yMm#lO3_p90EyPMhd<-aHF zFBj~z%N8N;Sn1E-({Szkv9)BwpsfbeBH4)THjmU^VavT0Q~aZB_MAS z9)u~#yKudhzh1|`%mVnCW#Jv4ZTvKyC49*f9tHfug@`n=B;4RgU$WO=jFkB-&5|&>WeEqZQXXYw z2o^7yAF(jXcoO+*_A8GT3{1G?41tutEN1aG+ibI5>*z(R1^NXE2NVEZh9DbY<82af z2GsAcWw!F81rRR4TpJ#BW-}b%Y<9w|1TEF#!766f(a{mZ8AKp`5@GsMFq)r$o(mSm zk)3}QV@??WOe5>O1!e%nQ;_E;iGR;JFa*#N2Y1U8;ClfL&IvTWfPp44^T963?e-3= zffV|4`vc;LgAD8;OaVqZ9RLT=1k(w8*pIT?1wXPoAD8q;;4A*oUx07i6(R(7{YQL`&m8!+vzz-JT_VTUYtMn}1sgvy?#pTCC>>)lT;$zf1 zqd%d5-6M`3Xhhh((U>5)Jy5)2g zYbt)*Q%5vUGr={@#5Y8%Xn+^d0`~T%*)&2kPNQjd<~q(a@#n$9pMFI3g9Tqroiy8i zu!I{FD*X~>D+W>HZ#WB9ev;;fpU3fx3|~yk|kS?4NHHW!VA2? zT#@hPgQWLP7kR|%yZ3M3N}mWIeOi|E(QZp0qPKg(`rVTps_nN=SbN^?N^BP9CyQOY zVpf>Ws1pp-#fJ7jA}%93Qa9U`K3oT;o(+2=sm&600xTgxBDDnxbwS}MLfD~52e~Qa zjL?GM2TQHv7}9DCIW~nXdJh?vL%@kl29XKj9)i=CDUt>8HpVg zKo)S%TacN#AFMi<3t7Y+Pj+t}^!g-ma{;0u#(Rk3ex;pZp9KkT7D;Qdq&*I*d4bwrG8c zoD2(^WL1}ert3Jm?KoYWQ<|pEpxb(`HTJt|*M8acbYSYMwAMQh%FabLHp({<>rh?^ zWh)}fL8#63?!&5kAYeQ%t zX*lGmIkUY3NTX>;i-;w`&OGt2u(qDA`1A*7}o!78-cC<)}wpBT>U5AI;f! zL1{D%iCi>CsW2DRq>-;=#D(GQ$9hLeg+#PsVMc<0$;n zzo%-GHlR|%G619oB?_E7r-IU zmT;VAePoiR5Bao&^Q0L^CTTe2)j19%LOiP&4W!XDB=TxWqo-ydw6sjpaLA)&jo=)h zY_pnZ8WMSQ&JFu53(r|bD4nQb$v&;KOAe_MH7wb)2OcPf$GxX5+_bcw;!&?fC%q@) znD>NEd1k#oyR)VX#Rnb^J9LCo#hBXb2p&ZSank9rmdT6+4TGY>Bn=H~YS$1b9*n|D zh`M?j2E~FnpsES^6P$RS>x6z63CiKXqbSG^xr!<9jP{fBpNm)Ui-+gR(r&kcmv@Z_ z-_!?muS=%5c}%j&mix&!^)zTfG544jc}&*UhW+#~_cdrj5&J)(3B|k6MBZx-l=;=^ zF3~FwU{Gg(Q>W}AU^1*9{NxJ1$~j~q#PNWBl=JK(C$}-CYG2Bjnly=TUgvwLoLbgL zb!uH1LI3)L*5ycp`L718<^#&F`Y`jk7ey#BdAWQj)mJ4iB}r6sn6u(i1H~}a@@1wn zSbcwS5KnuE)1z)ktAQA=?5L`*YlV{iLSO47HbZdMzKbtv*%;#TXmC5YNw?@lfu zx*y88${f+6om<83k^T)*a0yM=gqrYKko@(}yx{acf=kxZG}sGVY;_%RAq^ zjJu7(AYRaYRK1SdK&nT7pN_u`%(zrFkTe|1$^|o?P2t}s_|GnI>+n$RH)X^|raHDL z?|vn0I+DoPP+~>BLFf*>jZB)}6caKw6nhcd*@YrrI!q4}+cBKf|2ZEqOH>pzB6wsOV>fUEcpzasYI2A_`&c#aI$R8t|BuR( ziXexJfvls}WWMCZK#|RU*UdmfXYlO$Rmomg0}XI;p-QfBszzz(Y|!NocR5fD4OeO? zlw)p(lq>CIsES$D{1}saz&!!==xaUxa2E#hu)ee*l!}74`x0TB*HY20w3Ll#Da%*3 z2XVVlD63vC&{W{!O6%ZoDdrMBaY>~It)^pTC#F=X3*7Q90wFyD;)ph^&GWA6^|u}f zL}TTqpEVFYjt>_f!~esJkHTr>n-2=ZYFkO0Qw*^Y#lyH354r~Y#Q*>R literal 0 HcmV?d00001 diff --git a/ext/standard/tests/general_functions/intval.phpt b/ext/standard/tests/general_functions/intval.phpt index 01aedd8d21..f723148f49 100644 --- a/ext/standard/tests/general_functions/intval.phpt +++ b/ext/standard/tests/general_functions/intval.phpt @@ -1,5 +1,9 @@ --TEST-- Test intval() function. +--SKIPIF-- + --FILE-- --FILE-- +--INI-- +precision=14 +--FILE-- + + +--CLEAN-- +// close the resources used +fclose($fp); +closedir($dfp); + +--EXPECTF-- +*** Testing is_float(), is_double() and is_real() with float values*** +-- Iteration 1 -- +bool(false) +bool(false) +bool(false) +-- Iteration 2 -- +bool(false) +bool(false) +bool(false) +-- Iteration 3 -- +bool(false) +bool(false) +bool(false) +-- Iteration 4 -- +bool(false) +bool(false) +bool(false) +-- Iteration 5 -- +bool(false) +bool(false) +bool(false) +-- Iteration 6 -- +bool(false) +bool(false) +bool(false) +-- Iteration 7 -- +bool(true) +bool(true) +bool(true) +-- Iteration 8 -- +bool(true) +bool(true) +bool(true) +-- Iteration 9 -- +bool(true) +bool(true) +bool(true) +-- Iteration 10 -- +bool(true) +bool(true) +bool(true) +-- Iteration 11 -- +bool(true) +bool(true) +bool(true) +-- Iteration 12 -- +bool(true) +bool(true) +bool(true) +-- Iteration 13 -- +bool(true) +bool(true) +bool(true) +-- Iteration 14 -- +bool(true) +bool(true) +bool(true) +-- Iteration 15 -- +bool(true) +bool(true) +bool(true) +-- Iteration 16 -- +bool(true) +bool(true) +bool(true) +-- Iteration 17 -- +bool(true) +bool(true) +bool(true) +-- Iteration 18 -- +bool(true) +bool(true) +bool(true) +-- Iteration 19 -- +bool(true) +bool(true) +bool(true) +-- Iteration 20 -- +bool(true) +bool(true) +bool(true) +-- Iteration 21 -- +bool(true) +bool(true) +bool(true) +-- Iteration 22 -- +bool(true) +bool(true) +bool(true) +-- Iteration 23 -- +bool(true) +bool(true) +bool(true) +-- Iteration 24 -- +bool(true) +bool(true) +bool(true) +-- Iteration 25 -- +bool(true) +bool(true) +bool(true) +-- Iteration 26 -- +bool(true) +bool(true) +bool(true) +-- Iteration 27 -- +bool(true) +bool(true) +bool(true) +-- Iteration 28 -- +bool(true) +bool(true) +bool(true) +-- Iteration 29 -- +bool(true) +bool(true) +bool(true) +-- Iteration 30 -- +bool(true) +bool(true) +bool(true) + +*** Testing is_float(), is_double() & is_real() with non float values *** +--Iteration 1-- +bool(false) +bool(false) +bool(false) +--Iteration 2-- +bool(false) +bool(false) +bool(false) +--Iteration 3-- +bool(false) +bool(false) +bool(false) +--Iteration 4-- +bool(false) +bool(false) +bool(false) +--Iteration 5-- +bool(false) +bool(false) +bool(false) +--Iteration 6-- +bool(false) +bool(false) +bool(false) +--Iteration 7-- +bool(false) +bool(false) +bool(false) +--Iteration 8-- +bool(false) +bool(false) +bool(false) +--Iteration 9-- +bool(false) +bool(false) +bool(false) +--Iteration 10-- +bool(false) +bool(false) +bool(false) +--Iteration 11-- +bool(false) +bool(false) +bool(false) +--Iteration 12-- +bool(false) +bool(false) +bool(false) +--Iteration 13-- +bool(false) +bool(false) +bool(false) +--Iteration 14-- +bool(false) +bool(false) +bool(false) +--Iteration 15-- +bool(false) +bool(false) +bool(false) +--Iteration 16-- +bool(false) +bool(false) +bool(false) +--Iteration 17-- +bool(false) +bool(false) +bool(false) +--Iteration 18-- +bool(false) +bool(false) +bool(false) +--Iteration 19-- +bool(false) +bool(false) +bool(false) +--Iteration 20-- +bool(false) +bool(false) +bool(false) +--Iteration 21-- +bool(false) +bool(false) +bool(false) +--Iteration 22-- +bool(false) +bool(false) +bool(false) +--Iteration 23-- +bool(false) +bool(false) +bool(false) +--Iteration 24-- +bool(false) +bool(false) +bool(false) +--Iteration 25-- +bool(false) +bool(false) +bool(false) +--Iteration 26-- +bool(false) +bool(false) +bool(false) +--Iteration 27-- +bool(false) +bool(false) +bool(false) +--Iteration 28-- +bool(false) +bool(false) +bool(false) +--Iteration 29-- +bool(false) +bool(false) +bool(false) +--Iteration 30-- +bool(false) +bool(false) +bool(false) +--Iteration 31-- +bool(false) +bool(false) +bool(false) +--Iteration 32-- +bool(false) +bool(false) +bool(false) +--Iteration 33-- +bool(false) +bool(false) +bool(false) +--Iteration 34-- +bool(false) +bool(false) +bool(false) +--Iteration 35-- +bool(false) +bool(false) +bool(false) +--Iteration 36-- +bool(false) +bool(false) +bool(false) +--Iteration 37-- +bool(false) +bool(false) +bool(false) + +*** Testing error conditions *** + +Warning: is_float() expects exactly 1 parameter, 0 given in %s on line %d +NULL + +Warning: is_double() expects exactly 1 parameter, 0 given in %s on line %d +NULL + +Warning: is_real() expects exactly 1 parameter, 0 given in %s on line %d +NULL + +Warning: is_float() expects exactly 1 parameter, 2 given in %s on line %d +NULL + +Warning: is_double() expects exactly 1 parameter, 2 given in %s on line %d +NULL + +Warning: is_real() expects exactly 1 parameter, 2 given in %s on line %d +NULL +Done diff --git a/ext/standard/tests/general_functions/is_int.phpt b/ext/standard/tests/general_functions/is_int.phpt index 4bfdc84b94..79a8698fde 100644 --- a/ext/standard/tests/general_functions/is_int.phpt +++ b/ext/standard/tests/general_functions/is_int.phpt @@ -1,5 +1,9 @@ --TEST-- Test is_int() & it's FALIASes: is_long() & is_integer() functions +--SKIPIF-- + --FILE-- +--INI-- +precision=14 +--FILE-- + "One", "two" => 2), + + /* strings */ + "", + '', + "0", + '0', + "1", + '1', + "\x01", + '\x01', + "\01", + '\01', + 'string', + "string", + "true", + "FALSE", + 'false', + 'TRUE', + "NULL", + 'null', + + /* booleans */ + true, + false, + TRUE, + FALSE, + + /* undefined and unset vars */ + @$unset_var, + @$undefined_var +); +/* loop through the $not_int_types to see working of + is_int() on non integer types, expected output: bool(false) */ +$loop_counter = 1; +foreach ($not_int_types as $type ) { + echo "--Iteration $loop_counter--\n"; $loop_counter++; + var_dump( is_int($type) ); + var_dump( is_integer($type) ); + var_dump( is_long($type) ); +} + +echo "\n*** Testing error conditions ***\n"; +//Zero argument +var_dump( is_int() ); +var_dump( is_integer() ); +var_dump( is_long() ); + +//arguments more than expected +var_dump( is_int(TRUE, FALSE) ); +var_dump( is_integer(TRUE, FALSE) ); +var_dump( is_long(TRUE, FALSE) ); + +echo "Done\n"; +?> + +--CLEAN-- +// close the resources +fclose($fp); +closedir($dfp); + +--EXPECTF-- +*** Testing is_int(), is_integer() & is_long() with valid integer values *** +--Iteration 1-- +bool(true) +bool(true) +bool(true) +--Iteration 2-- +bool(true) +bool(true) +bool(true) +--Iteration 3-- +bool(true) +bool(true) +bool(true) +--Iteration 4-- +bool(true) +bool(true) +bool(true) +--Iteration 5-- +bool(true) +bool(true) +bool(true) +--Iteration 6-- +bool(true) +bool(true) +bool(true) +--Iteration 7-- +bool(true) +bool(true) +bool(true) +--Iteration 8-- +bool(true) +bool(true) +bool(true) +--Iteration 9-- +bool(true) +bool(true) +bool(true) +--Iteration 10-- +bool(true) +bool(true) +bool(true) +--Iteration 11-- +bool(true) +bool(true) +bool(true) +--Iteration 12-- +bool(true) +bool(true) +bool(true) +--Iteration 13-- +bool(true) +bool(true) +bool(true) +--Iteration 14-- +bool(true) +bool(true) +bool(true) +--Iteration 15-- +bool(true) +bool(true) +bool(true) +--Iteration 16-- +bool(true) +bool(true) +bool(true) +--Iteration 17-- +bool(true) +bool(true) +bool(true) +--Iteration 18-- +bool(true) +bool(true) +bool(true) + +*** Testing is_int(), is_integer() & is_long() with non integer values *** +--Iteration 1-- +bool(true) +bool(true) +bool(true) +--Iteration 2-- +bool(true) +bool(true) +bool(true) +--Iteration 3-- +bool(true) +bool(true) +bool(true) +--Iteration 4-- +bool(true) +bool(true) +bool(true) +--Iteration 5-- +bool(true) +bool(true) +bool(true) +--Iteration 6-- +bool(true) +bool(true) +bool(true) +--Iteration 7-- +bool(false) +bool(false) +bool(false) +--Iteration 8-- +bool(false) +bool(false) +bool(false) +--Iteration 9-- +bool(false) +bool(false) +bool(false) +--Iteration 10-- +bool(false) +bool(false) +bool(false) +--Iteration 11-- +bool(false) +bool(false) +bool(false) +--Iteration 12-- +bool(false) +bool(false) +bool(false) +--Iteration 13-- +bool(false) +bool(false) +bool(false) +--Iteration 14-- +bool(false) +bool(false) +bool(false) +--Iteration 15-- +bool(false) +bool(false) +bool(false) +--Iteration 16-- +bool(false) +bool(false) +bool(false) +--Iteration 17-- +bool(false) +bool(false) +bool(false) +--Iteration 18-- +bool(false) +bool(false) +bool(false) +--Iteration 19-- +bool(false) +bool(false) +bool(false) +--Iteration 20-- +bool(false) +bool(false) +bool(false) +--Iteration 21-- +bool(false) +bool(false) +bool(false) +--Iteration 22-- +bool(false) +bool(false) +bool(false) +--Iteration 23-- +bool(false) +bool(false) +bool(false) +--Iteration 24-- +bool(false) +bool(false) +bool(false) +--Iteration 25-- +bool(false) +bool(false) +bool(false) +--Iteration 26-- +bool(false) +bool(false) +bool(false) +--Iteration 27-- +bool(false) +bool(false) +bool(false) +--Iteration 28-- +bool(false) +bool(false) +bool(false) +--Iteration 29-- +bool(false) +bool(false) +bool(false) +--Iteration 30-- +bool(false) +bool(false) +bool(false) +--Iteration 31-- +bool(false) +bool(false) +bool(false) +--Iteration 32-- +bool(false) +bool(false) +bool(false) +--Iteration 33-- +bool(false) +bool(false) +bool(false) +--Iteration 34-- +bool(false) +bool(false) +bool(false) +--Iteration 35-- +bool(false) +bool(false) +bool(false) +--Iteration 36-- +bool(false) +bool(false) +bool(false) +--Iteration 37-- +bool(false) +bool(false) +bool(false) +--Iteration 38-- +bool(false) +bool(false) +bool(false) +--Iteration 39-- +bool(false) +bool(false) +bool(false) +--Iteration 40-- +bool(false) +bool(false) +bool(false) +--Iteration 41-- +bool(false) +bool(false) +bool(false) +--Iteration 42-- +bool(false) +bool(false) +bool(false) +--Iteration 43-- +bool(false) +bool(false) +bool(false) +--Iteration 44-- +bool(false) +bool(false) +bool(false) +--Iteration 45-- +bool(false) +bool(false) +bool(false) +--Iteration 46-- +bool(false) +bool(false) +bool(false) +--Iteration 47-- +bool(false) +bool(false) +bool(false) +--Iteration 48-- +bool(false) +bool(false) +bool(false) +--Iteration 49-- +bool(false) +bool(false) +bool(false) +--Iteration 50-- +bool(false) +bool(false) +bool(false) +--Iteration 51-- +bool(false) +bool(false) +bool(false) +--Iteration 52-- +bool(false) +bool(false) +bool(false) +--Iteration 53-- +bool(false) +bool(false) +bool(false) +--Iteration 54-- +bool(false) +bool(false) +bool(false) + +*** Testing error conditions *** + +Warning: is_int() expects exactly 1 parameter, 0 given in %s on line %d +NULL + +Warning: is_integer() expects exactly 1 parameter, 0 given in %s on line %d +NULL + +Warning: is_long() expects exactly 1 parameter, 0 given in %s on line %d +NULL + +Warning: is_int() expects exactly 1 parameter, 2 given in %s on line %d +NULL + +Warning: is_integer() expects exactly 1 parameter, 2 given in %s on line %d +NULL + +Warning: is_long() expects exactly 1 parameter, 2 given in %s on line %d +NULL +Done diff --git a/ext/standard/tests/general_functions/print_r_64bit.phpt b/ext/standard/tests/general_functions/print_r_64bit.phpt new file mode 100644 index 0000000000..11aaf35c5d --- /dev/null +++ b/ext/standard/tests/general_functions/print_r_64bit.phpt @@ -0,0 +1,1740 @@ +--TEST-- +Test print_r() function +--SKIPIF-- + +--INI-- +precision=14 +--FILE-- + + 'One'), + array("test" => "is_array"), + array(0), + array(-1), + array(10.5, 5.6), + array("string", "test"), + array('string', 'test'), +); +/* calling check_printr() to display contents of $arrays */ +check_printr($arrays); + +echo "\n*** Testing print_r() on object variables ***\n"; +class object_class +{ + var $value; + public $public_var1 = 10; + private $private_var1 = 20; + private $private_var2; + protected $protected_var1 = "string_1"; + protected $protected_var2; + + function object_class ( ) { + $this->value = 50; + $this->public_var2 = 11; + $this->private_var2 = 21; + $this->protected_var2 = "string_2"; + } + + public function foo1() { + echo "foo1() is called\n"; + } + protected function foo2() { + echo "foo2() is called\n"; + } + private function foo3() { + echo "foo3() is called\n"; + } +} +/* class with no member */ +class no_member_class { + // no members +} + +/* class with member as object of other class */ +class contains_object_class +{ + var $p = 30; + var $class_object1; + public $class_object2; + private $class_object3; + protected $class_object4; + var $no_member_class_object; + + public function func() { + echo "func() is called \n"; + } + + function contains_object_class () { + $this->class_object1 = new object_class(); + $this->class_object2 = new object_class(); + $this->class_object3 = $this->class_object1; + $this->class_object4 = $this->class_object2; + $this->no_member_class_object = new no_member_class(); + $this->class_object5 = $this; //recursive reference + } +} + +/* objects of different classes */ +$obj = new contains_object_class; +$temp_class_obj = new object_class(); + +/* object which is unset */ +$unset_obj = new object_class(); +unset($unset_obj); + +$objects = array ( + new object_class, + new no_member_class, + new contains_object_class, + $obj, + $obj->class_object1, + $obj->class_object2, + $obj->no_member_class_object, + $temp_class_obj, + @$unset_obj +); +/* calling check_printr() to display contents of the objects using print_r() */ +check_printr($objects); + +echo "\n** Testing print_r() on objects having circular reference **\n"; +$recursion_obj1 = new object_class(); +$recursion_obj2 = new object_class(); +$recursion_obj1->obj = &$recursion_obj2; //circular reference +$recursion_obj2->obj = &$recursion_obj1; //circular reference +print_r($recursion_obj2); + +echo "\n*** Testing print_r() on resources ***\n"; +/* file type resource */ +$file_handle = fopen(__FILE__, "r"); + +/* directory type resource */ +$dir_handle = opendir( dirname(__FILE__) ); + +$resources = array ( + $file_handle, + $dir_handle +); +/* calling check_printr() to display the resource content type + using print_r() */ +check_printr($resources); + +echo "\n*** Testing print_r() on different combinations of scalar + and non-scalar variables ***\n"; +/* a variable which is unset */ +$unset_var = 10.5; +unset($unset_var); + +/* unset file type resource */ +unset($file_handle); + +$variations = array ( + array( 123, -1.2345, "a" ), + array( "d", array(1, 3, 5), true, null), + array( new no_member_class, array(), false, 0 ), + array( -0.00, "Where am I?", array(7,8,9), TRUE, 'A', 987654321 ), + array( @$unset_var, 2.E+10, 100-20.9, 000004.599998 ), //unusual data + array( "array(1,2,3,4)1.0000002TRUE", @$file_handle, 111333.00+45e5, '/00\7') +); +/* calling check_printr() to display combinations of scalar and + non-scalar variables using print_r() */ +check_printr($variations); + +echo "\n*** Testing print_r() on miscelleneous input arguments ***\n"; +$misc_values = array ( + @$unset_var, + NULL, // NULL argument + @$undef_variable, //undefined variable + null +); +/* calling check_printr() to display miscelleneous data using print_r() */ +check_printr($misc_values); + +/* checking print_r() on functions */ +echo "\n*** Testing print_r() on anonymous functions ***\n"; +$newfunc = create_function('$a,$b', 'return "$a * $b = " . ($a * $b);'); +echo "New anonymous function: $newfunc\n"; +print_r( $newfunc(2, 3) ); +/* creating anonymous function dynamically */ +print_r( create_function('$a', 'return "$a * $a = " . ($a * $b);') ); + +echo "\n\n*** Testing error conditions ***\n"; +//passing zero argument +var_dump( print_r() ); + +//passing more than required no. of arguments +var_dump( print_r(123, true, "abc") ); + +// check when second arg is given other than boolean TRUE +var_dump( print_r ($value, "string") ); + +/* closing resource handle used */ +closedir($dir_handle); + +echo "Done\n"; +?> +--EXPECTF-- +*** Testing print_r() on integer variables *** + +-- Iteration 1 -- +0 +0 +0 +-- Iteration 2 -- +83 +83 +83 +-- Iteration 3 -- +123000000 +123000000 +123000000 +-- Iteration 4 -- +-83 +-83 +-83 +-- Iteration 5 -- +-12300000 +-12300000 +-12300000 +-- Iteration 6 -- +Array +( + [0] => 1 + [1] => 2 + [2] => 3 + [3] => 4 + [4] => 5 + [5] => 6 + [6] => 7 + [7] => 8 + [8] => 9 + [9] => 10 +) + +Array +( + [0] => 1 + [1] => 2 + [2] => 3 + [3] => 4 + [4] => 5 + [5] => 6 + [6] => 7 + [7] => 8 + [8] => 9 + [9] => 10 +) + +Array +( + [0] => 1 + [1] => 2 + [2] => 3 + [3] => 4 + [4] => 5 + [5] => 6 + [6] => 7 + [7] => 8 + [8] => 9 + [9] => 10 +) + +-- Iteration 7 -- +Array +( + [0] => -1 + [1] => -2 + [2] => -3 + [3] => -4 + [4] => -5 + [5] => -6 + [6] => -7 + [7] => -8 + [8] => -9 + [9] => -10 +) + +Array +( + [0] => -1 + [1] => -2 + [2] => -3 + [3] => -4 + [4] => -5 + [5] => -6 + [6] => -7 + [7] => -8 + [8] => -9 + [9] => -10 +) + +Array +( + [0] => -1 + [1] => -2 + [2] => -3 + [3] => -4 + [4] => -5 + [5] => -6 + [6] => -7 + [7] => -8 + [8] => -9 + [9] => -10 +) + +-- Iteration 8 -- +2147483647 +2147483647 +2147483647 +-- Iteration 9 -- +2147483648 +2147483648 +2147483648 +-- Iteration 10 -- +-2147483648 +-2147483648 +-2147483648 +-- Iteration 11 -- +-2147483647 +-2147483647 +-2147483647 +-- Iteration 12 -- +2147483647 +2147483647 +2147483647 +-- Iteration 13 -- +-2147483648 +-2147483648 +-2147483648 +-- Iteration 14 -- +2147483647 +2147483647 +2147483647 +-- Iteration 15 -- +-2147483648 +-2147483648 +-2147483648 +*** Testing print_r() on float variables *** + +-- Iteration 1 -- +0 +0 +0 +-- Iteration 2 -- +0 +0 +0 +-- Iteration 3 -- +1.234 +1.234 +1.234 +-- Iteration 4 -- +-1.234 +-1.234 +-1.234 +-- Iteration 5 -- +-2 +-2 +-2 +-- Iteration 6 -- +2 +2 +2 +-- Iteration 7 -- +-0.5 +-0.5 +-0.5 +-- Iteration 8 -- +0.567 +0.567 +0.567 +-- Iteration 9 -- +-0.00067 +-0.00067 +-0.00067 +-- Iteration 10 -- +-670 +-670 +-670 +-- Iteration 11 -- +670 +670 +670 +-- Iteration 12 -- +670 +670 +670 +-- Iteration 13 -- +-0.00410003 +-0.00410003 +-0.00410003 +-- Iteration 14 -- +-4100.03 +-4100.03 +-4100.03 +-- Iteration 15 -- +0.004100003 +0.004100003 +0.004100003 +-- Iteration 16 -- +4100.003 +4100.003 +4100.003 +-- Iteration 17 -- +100000 +100000 +100000 +-- Iteration 18 -- +-100000 +-100000 +-100000 +-- Iteration 19 -- +1.0E-5 +1.0E-5 +1.0E-5 +-- Iteration 20 -- +-1.0E-5 +-1.0E-5 +-1.0E-5 +-- Iteration 21 -- +100000 +100000 +100000 +-- Iteration 22 -- +-100000 +-100000 +-100000 +-- Iteration 23 -- +100000 +100000 +100000 +-- Iteration 24 -- +-100000 +-100000 +-100000 +-- Iteration 25 -- +100000 +100000 +100000 +-- Iteration 26 -- +-100000 +-100000 +-100000 +-- Iteration 27 -- +1.0E-5 +1.0E-5 +1.0E-5 +-- Iteration 28 -- +-1.0E-5 +-1.0E-5 +-1.0E-5 +-- Iteration 29 -- +-2147483649 +-2147483649 +-2147483649 +-- Iteration 30 -- +2147483649 +2147483649 +2147483649 +-- Iteration 31 -- +2147483649 +2147483649 +2147483649 +-- Iteration 32 -- +-2147483649 +-2147483649 +-2147483649 +*** Testing print_r() on string variables *** + +-- Iteration 1 -- + + + +-- Iteration 2 -- + + + +-- Iteration 3 -- + + + +-- Iteration 4 -- + + + +-- Iteration 5 -- +0 +0 +0 +-- Iteration 6 -- + + + +-- Iteration 7 -- +\0 +\0 +\0 +-- Iteration 8 -- + + + +-- Iteration 9 -- +\t +\t +\t +-- Iteration 10 -- +PHP +PHP +PHP +-- Iteration 11 -- +PHP +PHP +PHP +-- Iteration 12 -- +abcdn12340567800efgh\xijkl +abcdn12340567800efgh\xijkl +abcdn12340567800efgh\xijkl +-- Iteration 13 -- +abcdefghijklmnop0qrstuvwx0yz +abcdefghijklmnop0qrstuvwx0yz +abcdefghijklmnop0qrstuvwx0yz +-- Iteration 14 -- +1234 +5678 + 9100 +abcda +1234 +5678 + 9100 +abcda +1234 +5678 + 9100 +abcda +*** Testing print_r() on boolean variables *** + +-- Iteration 1 -- +1 +1 +1 +-- Iteration 2 -- + + + +-- Iteration 3 -- +1 +1 +1 +-- Iteration 4 -- + + +bool(true) + +bool(true) + +*** Testing print_r() on array variables *** + +-- Iteration 1 -- +Array +( +) + +Array +( +) + +Array +( +) + +-- Iteration 2 -- +Array +( + [0] => +) + +Array +( + [0] => +) + +Array +( + [0] => +) + +-- Iteration 3 -- +Array +( + [0] => +) + +Array +( + [0] => +) + +Array +( + [0] => +) + +-- Iteration 4 -- +Array +( + [0] => 1 +) + +Array +( + [0] => 1 +) + +Array +( + [0] => 1 +) + +-- Iteration 5 -- +Array +( + [0] => +) + +Array +( + [0] => +) + +Array +( + [0] => +) + +-- Iteration 6 -- +Array +( + [0] => +) + +Array +( + [0] => +) + +Array +( + [0] => +) + +-- Iteration 7 -- +Array +( + [0] => Array + ( + ) + + [1] => Array + ( + ) + +) + +Array +( + [0] => Array + ( + ) + + [1] => Array + ( + ) + +) + +Array +( + [0] => Array + ( + ) + + [1] => Array + ( + ) + +) + +-- Iteration 8 -- +Array +( + [0] => Array + ( + [0] => 1 + [1] => 2 + ) + + [1] => Array + ( + [0] => a + [1] => b + ) + +) + +Array +( + [0] => Array + ( + [0] => 1 + [1] => 2 + ) + + [1] => Array + ( + [0] => a + [1] => b + ) + +) + +Array +( + [0] => Array + ( + [0] => 1 + [1] => 2 + ) + + [1] => Array + ( + [0] => a + [1] => b + ) + +) + +-- Iteration 9 -- +Array +( + [1] => One +) + +Array +( + [1] => One +) + +Array +( + [1] => One +) + +-- Iteration 10 -- +Array +( + [test] => is_array +) + +Array +( + [test] => is_array +) + +Array +( + [test] => is_array +) + +-- Iteration 11 -- +Array +( + [0] => 0 +) + +Array +( + [0] => 0 +) + +Array +( + [0] => 0 +) + +-- Iteration 12 -- +Array +( + [0] => -1 +) + +Array +( + [0] => -1 +) + +Array +( + [0] => -1 +) + +-- Iteration 13 -- +Array +( + [0] => 10.5 + [1] => 5.6 +) + +Array +( + [0] => 10.5 + [1] => 5.6 +) + +Array +( + [0] => 10.5 + [1] => 5.6 +) + +-- Iteration 14 -- +Array +( + [0] => string + [1] => test +) + +Array +( + [0] => string + [1] => test +) + +Array +( + [0] => string + [1] => test +) + +-- Iteration 15 -- +Array +( + [0] => string + [1] => test +) + +Array +( + [0] => string + [1] => test +) + +Array +( + [0] => string + [1] => test +) + +*** Testing print_r() on object variables *** + +-- Iteration 1 -- +object_class Object +( + [value] => 50 + [public_var1] => 10 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 + [protected_var1:protected] => string_1 + [protected_var2:protected] => string_2 + [public_var2] => 11 +) + +object_class Object +( + [value] => 50 + [public_var1] => 10 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 + [protected_var1:protected] => string_1 + [protected_var2:protected] => string_2 + [public_var2] => 11 +) + +object_class Object +( + [value] => 50 + [public_var1] => 10 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 + [protected_var1:protected] => string_1 + [protected_var2:protected] => string_2 + [public_var2] => 11 +) + +-- Iteration 2 -- +no_member_class Object +( +) + +no_member_class Object +( +) + +no_member_class Object +( +) + +-- Iteration 3 -- +contains_object_class Object +( + [p] => 30 + [class_object1] => object_class Object + ( + [value] => 50 + [public_var1] => 10 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 + [protected_var1:protected] => string_1 + [protected_var2:protected] => string_2 + [public_var2] => 11 + ) + + [class_object2] => object_class Object + ( + [value] => 50 + [public_var1] => 10 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 + [protected_var1:protected] => string_1 + [protected_var2:protected] => string_2 + [public_var2] => 11 + ) + + [class_object3:contains_object_class:private] => object_class Object + ( + [value] => 50 + [public_var1] => 10 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 + [protected_var1:protected] => string_1 + [protected_var2:protected] => string_2 + [public_var2] => 11 + ) + + [class_object4:protected] => object_class Object + ( + [value] => 50 + [public_var1] => 10 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 + [protected_var1:protected] => string_1 + [protected_var2:protected] => string_2 + [public_var2] => 11 + ) + + [no_member_class_object] => no_member_class Object + ( + ) + + [class_object5] => contains_object_class Object + *RECURSION* +) + +contains_object_class Object +( + [p] => 30 + [class_object1] => object_class Object + ( + [value] => 50 + [public_var1] => 10 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 + [protected_var1:protected] => string_1 + [protected_var2:protected] => string_2 + [public_var2] => 11 + ) + + [class_object2] => object_class Object + ( + [value] => 50 + [public_var1] => 10 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 + [protected_var1:protected] => string_1 + [protected_var2:protected] => string_2 + [public_var2] => 11 + ) + + [class_object3:contains_object_class:private] => object_class Object + ( + [value] => 50 + [public_var1] => 10 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 + [protected_var1:protected] => string_1 + [protected_var2:protected] => string_2 + [public_var2] => 11 + ) + + [class_object4:protected] => object_class Object + ( + [value] => 50 + [public_var1] => 10 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 + [protected_var1:protected] => string_1 + [protected_var2:protected] => string_2 + [public_var2] => 11 + ) + + [no_member_class_object] => no_member_class Object + ( + ) + + [class_object5] => contains_object_class Object + *RECURSION* +) + +contains_object_class Object +( + [p] => 30 + [class_object1] => object_class Object + ( + [value] => 50 + [public_var1] => 10 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 + [protected_var1:protected] => string_1 + [protected_var2:protected] => string_2 + [public_var2] => 11 + ) + + [class_object2] => object_class Object + ( + [value] => 50 + [public_var1] => 10 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 + [protected_var1:protected] => string_1 + [protected_var2:protected] => string_2 + [public_var2] => 11 + ) + + [class_object3:contains_object_class:private] => object_class Object + ( + [value] => 50 + [public_var1] => 10 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 + [protected_var1:protected] => string_1 + [protected_var2:protected] => string_2 + [public_var2] => 11 + ) + + [class_object4:protected] => object_class Object + ( + [value] => 50 + [public_var1] => 10 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 + [protected_var1:protected] => string_1 + [protected_var2:protected] => string_2 + [public_var2] => 11 + ) + + [no_member_class_object] => no_member_class Object + ( + ) + + [class_object5] => contains_object_class Object + *RECURSION* +) + +-- Iteration 4 -- +contains_object_class Object +( + [p] => 30 + [class_object1] => object_class Object + ( + [value] => 50 + [public_var1] => 10 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 + [protected_var1:protected] => string_1 + [protected_var2:protected] => string_2 + [public_var2] => 11 + ) + + [class_object2] => object_class Object + ( + [value] => 50 + [public_var1] => 10 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 + [protected_var1:protected] => string_1 + [protected_var2:protected] => string_2 + [public_var2] => 11 + ) + + [class_object3:contains_object_class:private] => object_class Object + ( + [value] => 50 + [public_var1] => 10 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 + [protected_var1:protected] => string_1 + [protected_var2:protected] => string_2 + [public_var2] => 11 + ) + + [class_object4:protected] => object_class Object + ( + [value] => 50 + [public_var1] => 10 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 + [protected_var1:protected] => string_1 + [protected_var2:protected] => string_2 + [public_var2] => 11 + ) + + [no_member_class_object] => no_member_class Object + ( + ) + + [class_object5] => contains_object_class Object + *RECURSION* +) + +contains_object_class Object +( + [p] => 30 + [class_object1] => object_class Object + ( + [value] => 50 + [public_var1] => 10 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 + [protected_var1:protected] => string_1 + [protected_var2:protected] => string_2 + [public_var2] => 11 + ) + + [class_object2] => object_class Object + ( + [value] => 50 + [public_var1] => 10 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 + [protected_var1:protected] => string_1 + [protected_var2:protected] => string_2 + [public_var2] => 11 + ) + + [class_object3:contains_object_class:private] => object_class Object + ( + [value] => 50 + [public_var1] => 10 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 + [protected_var1:protected] => string_1 + [protected_var2:protected] => string_2 + [public_var2] => 11 + ) + + [class_object4:protected] => object_class Object + ( + [value] => 50 + [public_var1] => 10 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 + [protected_var1:protected] => string_1 + [protected_var2:protected] => string_2 + [public_var2] => 11 + ) + + [no_member_class_object] => no_member_class Object + ( + ) + + [class_object5] => contains_object_class Object + *RECURSION* +) + +contains_object_class Object +( + [p] => 30 + [class_object1] => object_class Object + ( + [value] => 50 + [public_var1] => 10 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 + [protected_var1:protected] => string_1 + [protected_var2:protected] => string_2 + [public_var2] => 11 + ) + + [class_object2] => object_class Object + ( + [value] => 50 + [public_var1] => 10 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 + [protected_var1:protected] => string_1 + [protected_var2:protected] => string_2 + [public_var2] => 11 + ) + + [class_object3:contains_object_class:private] => object_class Object + ( + [value] => 50 + [public_var1] => 10 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 + [protected_var1:protected] => string_1 + [protected_var2:protected] => string_2 + [public_var2] => 11 + ) + + [class_object4:protected] => object_class Object + ( + [value] => 50 + [public_var1] => 10 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 + [protected_var1:protected] => string_1 + [protected_var2:protected] => string_2 + [public_var2] => 11 + ) + + [no_member_class_object] => no_member_class Object + ( + ) + + [class_object5] => contains_object_class Object + *RECURSION* +) + +-- Iteration 5 -- +object_class Object +( + [value] => 50 + [public_var1] => 10 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 + [protected_var1:protected] => string_1 + [protected_var2:protected] => string_2 + [public_var2] => 11 +) + +object_class Object +( + [value] => 50 + [public_var1] => 10 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 + [protected_var1:protected] => string_1 + [protected_var2:protected] => string_2 + [public_var2] => 11 +) + +object_class Object +( + [value] => 50 + [public_var1] => 10 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 + [protected_var1:protected] => string_1 + [protected_var2:protected] => string_2 + [public_var2] => 11 +) + +-- Iteration 6 -- +object_class Object +( + [value] => 50 + [public_var1] => 10 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 + [protected_var1:protected] => string_1 + [protected_var2:protected] => string_2 + [public_var2] => 11 +) + +object_class Object +( + [value] => 50 + [public_var1] => 10 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 + [protected_var1:protected] => string_1 + [protected_var2:protected] => string_2 + [public_var2] => 11 +) + +object_class Object +( + [value] => 50 + [public_var1] => 10 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 + [protected_var1:protected] => string_1 + [protected_var2:protected] => string_2 + [public_var2] => 11 +) + +-- Iteration 7 -- +no_member_class Object +( +) + +no_member_class Object +( +) + +no_member_class Object +( +) + +-- Iteration 8 -- +object_class Object +( + [value] => 50 + [public_var1] => 10 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 + [protected_var1:protected] => string_1 + [protected_var2:protected] => string_2 + [public_var2] => 11 +) + +object_class Object +( + [value] => 50 + [public_var1] => 10 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 + [protected_var1:protected] => string_1 + [protected_var2:protected] => string_2 + [public_var2] => 11 +) + +object_class Object +( + [value] => 50 + [public_var1] => 10 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 + [protected_var1:protected] => string_1 + [protected_var2:protected] => string_2 + [public_var2] => 11 +) + +-- Iteration 9 -- + + + +** Testing print_r() on objects having circular reference ** +object_class Object +( + [value] => 50 + [public_var1] => 10 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 + [protected_var1:protected] => string_1 + [protected_var2:protected] => string_2 + [public_var2] => 11 + [obj] => object_class Object + ( + [value] => 50 + [public_var1] => 10 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 + [protected_var1:protected] => string_1 + [protected_var2:protected] => string_2 + [public_var2] => 11 + [obj] => object_class Object + *RECURSION* + ) + +) + +*** Testing print_r() on resources *** + +-- Iteration 1 -- +Resource id #5 +Resource id #5 +Resource id #5 +-- Iteration 2 -- +Resource id #6 +Resource id #6 +Resource id #6 +*** Testing print_r() on different combinations of scalar + and non-scalar variables *** + +-- Iteration 1 -- +Array +( + [0] => 123 + [1] => -1.2345 + [2] => a +) + +Array +( + [0] => 123 + [1] => -1.2345 + [2] => a +) + +Array +( + [0] => 123 + [1] => -1.2345 + [2] => a +) + +-- Iteration 2 -- +Array +( + [0] => d + [1] => Array + ( + [0] => 1 + [1] => 3 + [2] => 5 + ) + + [2] => 1 + [3] => +) + +Array +( + [0] => d + [1] => Array + ( + [0] => 1 + [1] => 3 + [2] => 5 + ) + + [2] => 1 + [3] => +) + +Array +( + [0] => d + [1] => Array + ( + [0] => 1 + [1] => 3 + [2] => 5 + ) + + [2] => 1 + [3] => +) + +-- Iteration 3 -- +Array +( + [0] => no_member_class Object + ( + ) + + [1] => Array + ( + ) + + [2] => + [3] => 0 +) + +Array +( + [0] => no_member_class Object + ( + ) + + [1] => Array + ( + ) + + [2] => + [3] => 0 +) + +Array +( + [0] => no_member_class Object + ( + ) + + [1] => Array + ( + ) + + [2] => + [3] => 0 +) + +-- Iteration 4 -- +Array +( + [0] => 0 + [1] => Where am I? + [2] => Array + ( + [0] => 7 + [1] => 8 + [2] => 9 + ) + + [3] => 1 + [4] => A + [5] => 987654321 +) + +Array +( + [0] => 0 + [1] => Where am I? + [2] => Array + ( + [0] => 7 + [1] => 8 + [2] => 9 + ) + + [3] => 1 + [4] => A + [5] => 987654321 +) + +Array +( + [0] => 0 + [1] => Where am I? + [2] => Array + ( + [0] => 7 + [1] => 8 + [2] => 9 + ) + + [3] => 1 + [4] => A + [5] => 987654321 +) + +-- Iteration 5 -- +Array +( + [0] => + [1] => 20000000000 + [2] => 79.1 + [3] => 4.599998 +) + +Array +( + [0] => + [1] => 20000000000 + [2] => 79.1 + [3] => 4.599998 +) + +Array +( + [0] => + [1] => 20000000000 + [2] => 79.1 + [3] => 4.599998 +) + +-- Iteration 6 -- +Array +( + [0] => array(1,2,3,4)1.0000002TRUE + [1] => + [2] => 4611333 + [3] => /00\7 +) + +Array +( + [0] => array(1,2,3,4)1.0000002TRUE + [1] => + [2] => 4611333 + [3] => /00\7 +) + +Array +( + [0] => array(1,2,3,4)1.0000002TRUE + [1] => + [2] => 4611333 + [3] => /00\7 +) + +*** Testing print_r() on miscelleneous input arguments *** + +-- Iteration 1 -- + + + +-- Iteration 2 -- + + + +-- Iteration 3 -- + + + +-- Iteration 4 -- + + + +*** Testing print_r() on anonymous functions *** +New anonymous function: lambda_1 +2 * 3 = 6lambda_2 + +*** Testing error conditions *** + +Warning: print_r() expects at least 1 parameter, 0 given in %s on line %d +bool(false) + +Warning: print_r() expects at most 2 parameters, 3 given in %s on line %d +bool(false) + +Notice: Undefined variable: value in %s on line %d +string(0) "" +Done diff --git a/ext/standard/tests/general_functions/var_dump_64bit.phpt b/ext/standard/tests/general_functions/var_dump_64bit.phpt new file mode 100644 index 0000000000..48cd301052 --- /dev/null +++ b/ext/standard/tests/general_functions/var_dump_64bit.phpt @@ -0,0 +1,3533 @@ +--TEST-- +Test var_dump() function +--SKIPIF-- + +--INI-- +precision=14 +--FILE-- + 'One'), + array("test" => "is_array"), + array(0), + array(-1), + array(10.5, 5.6), + array("string", "test"), + array('string', 'test'), +); +/* calling check_vardump() to display contents of an array + using var_dump() */ +check_vardump($arrays); + +echo "\n*** Testing var_dump() on object variables ***\n"; +class object_class +{ + var $value; + public $public_var1 = 10; + private $private_var1 = 20; + private $private_var2; + protected $protected_var1 = "string_1"; + protected $protected_var2; + + function object_class ( ) { + $this->value = 50; + $this->public_var2 = 11; + $this->private_var2 = 21; + $this->protected_var2 = "string_2"; + } + + public function foo1() { + echo "foo1() is called\n"; + } + protected function foo2() { + echo "foo2() is called\n"; + } + private function foo3() { + echo "foo3() is called\n"; + } +} +/* class with no member */ +class no_member_class { + // no members +} + +/* class with member as object of other class */ +class contains_object_class +{ + var $p = 30; + var $class_object1; + public $class_object2; + private $class_object3; + protected $class_object4; + var $no_member_class_object; + + public function func() { + echo "func() is called \n"; + } + + function contains_object_class () { + $this->class_object1 = new object_class(); + $this->class_object2 = new object_class(); + $this->class_object3 = $this->class_object1; + $this->class_object4 = $this->class_object2; + $this->no_member_class_object = new no_member_class(); + $this->class_object5 = $this; //recursive reference + } +} + +/* objects of different classes */ +$obj = new contains_object_class; +$temp_class_obj = new object_class(); + +/* object which is unset */ +$unset_obj = new object_class(); +unset($unset_obj); + +$objects = array ( + new object_class, + new no_member_class, + new contains_object_class, + $obj, + $obj->class_object1, + $obj->class_object2, + $obj->no_member_class_object, + $temp_class_obj, + @$unset_obj +); +/* calling check_vardump() to display contents of the objects + using var_dump() */ +check_vardump($objects); + +echo "\n** Testing var_dump() on objects having circular reference **\n"; +$recursion_obj1 = new object_class(); +$recursion_obj2 = new object_class(); +$recursion_obj1->obj = &$recursion_obj2; //circular reference +$recursion_obj2->obj = &$recursion_obj1; //circular reference +var_dump($recursion_obj2); + +echo "\n*** Testing var_dump() on resources ***\n"; +/* file type resource */ +$file_handle = fopen(__FILE__, "r"); + +/* directory type resource */ +$dir_handle = opendir( dirname(__FILE__) ); + +$resources = array ( + $file_handle, + $dir_handle +); +/* calling check_vardump() to display the resource content type + using var_dump() */ +check_vardump($resources); + +echo "\n*** Testing var_dump() on different combinations of scalar + and non-scalar variables ***\n"; +/* a variable which is unset */ +$unset_var = 10.5; +unset($unset_var); + +/* unset file type resource */ +unset($file_handle); + +$variations = array ( + array( 123, -1.2345, "a" ), + array( "d", array(1, 3, 5), true, null), + array( new no_member_class, array(), false, 0 ), + array( -0.00, "Where am I?", array(7,8,9), TRUE, 'A', 987654321 ), + array( @$unset_var, 2.E+10, 100-20.9, 000004.599998 ), //unusual data + array( "array(1,2,3,4)1.0000002TRUE", @$file_handle, 111333.00+45e5, '/00\7') +); +/* calling check_vardump() to display combinations of scalar and + non-scalar variables using var_dump() */ +check_vardump($variations); + +echo "\n*** Testing var_dump() on miscelleneous input arguments ***\n"; +$misc_values = array ( + @$unset_var, + NULL, // NULL argument + @$undef_variable, //undefined variable + null +); +/* calling check_vardump() to display miscelleneous data using var_dump() */ +check_vardump($misc_values); + +echo "\n*** Testing var_dump() on multiple arguments ***\n"; +var_dump( $integers, $floats, $strings, $arrays, $booleans, $resources, + $objects, $misc_values, $variations ); + +/* checking var_dump() on functions */ +echo "\n*** Testing var_dump() on anonymous functions ***\n"; +$newfunc = create_function('$a,$b', 'return "$a * $b = " . ($a * $b);'); +echo "New anonymous function: $newfunc\n"; +var_dump( $newfunc(2, 3) ); +/* creating anonymous function dynamically */ +var_dump( create_function('$a', 'return "$a * $a = " . ($a * $b);') ); + +echo "\n*** Testing error conditions ***\n"; +//passing zero argument +var_dump(); + +/* closing resource handle used */ +closedir($dir_handle); + +echo "Done\n"; +?> +--EXPECTF-- +*** Testing var_dump() on integer variables *** +-- Iteration 1 -- +int(0) +-- Iteration 2 -- +int(83) +-- Iteration 3 -- +int(123000000) +-- Iteration 4 -- +int(-83) +-- Iteration 5 -- +int(-12300000) +-- Iteration 6 -- +array(10) { + [0]=> + int(1) + [1]=> + int(2) + [2]=> + int(3) + [3]=> + int(4) + [4]=> + int(5) + [5]=> + int(6) + [6]=> + int(7) + [7]=> + int(8) + [8]=> + int(9) + [9]=> + int(10) +} +-- Iteration 7 -- +array(10) { + [0]=> + int(-1) + [1]=> + int(-2) + [2]=> + int(-3) + [3]=> + int(-4) + [4]=> + int(-5) + [5]=> + int(-6) + [6]=> + int(-7) + [7]=> + int(-8) + [8]=> + int(-9) + [9]=> + int(-10) +} +-- Iteration 8 -- +int(2147483647) +-- Iteration 9 -- +int(2147483648) +-- Iteration 10 -- +int(-2147483648) +-- Iteration 11 -- +int(-2147483647) +-- Iteration 12 -- +int(2147483647) +-- Iteration 13 -- +int(-2147483648) +-- Iteration 14 -- +int(2147483647) +-- Iteration 15 -- +int(-2147483648) + +*** Testing var_dump() on float variables *** +-- Iteration 1 -- +float(0) +-- Iteration 2 -- +float(0) +-- Iteration 3 -- +float(1.234) +-- Iteration 4 -- +float(-1.234) +-- Iteration 5 -- +float(-2) +-- Iteration 6 -- +float(2) +-- Iteration 7 -- +float(-0.5) +-- Iteration 8 -- +float(0.567) +-- Iteration 9 -- +float(-0.00067) +-- Iteration 10 -- +float(-670) +-- Iteration 11 -- +float(670) +-- Iteration 12 -- +float(670) +-- Iteration 13 -- +float(-0.00410003) +-- Iteration 14 -- +float(-4100.03) +-- Iteration 15 -- +float(0.004100003) +-- Iteration 16 -- +float(4100.003) +-- Iteration 17 -- +float(100000) +-- Iteration 18 -- +float(-100000) +-- Iteration 19 -- +float(1.0E-5) +-- Iteration 20 -- +float(-1.0E-5) +-- Iteration 21 -- +float(100000) +-- Iteration 22 -- +float(-100000) +-- Iteration 23 -- +float(100000) +-- Iteration 24 -- +float(-100000) +-- Iteration 25 -- +float(100000) +-- Iteration 26 -- +float(-100000) +-- Iteration 27 -- +float(1.0E-5) +-- Iteration 28 -- +float(-1.0E-5) +-- Iteration 29 -- +int(-2147483649) +-- Iteration 30 -- +int(2147483649) +-- Iteration 31 -- +int(2147483649) +-- Iteration 32 -- +int(-2147483649) + +*** Testing var_dump() on string variables *** +-- Iteration 1 -- +string(0) "" +-- Iteration 2 -- +string(0) "" +-- Iteration 3 -- +string(1) " " +-- Iteration 4 -- +string(1) " " +-- Iteration 5 -- +string(1) "0" +-- Iteration 6 -- +string(1) "" +-- Iteration 7 -- +string(2) "\0" +-- Iteration 8 -- +string(1) " " +-- Iteration 9 -- +string(2) "\t" +-- Iteration 10 -- +string(3) "PHP" +-- Iteration 11 -- +string(3) "PHP" +-- Iteration 12 -- +string(29) "abcdn12340567800efgh\xijkl" +-- Iteration 13 -- +string(34) "abcdefghijklmnop0qrstuvwx0yz" +-- Iteration 14 -- +string(22) "1234 +5678 + 9100 +abcda" + +*** Testing var_dump() on boolean variables *** +-- Iteration 1 -- +bool(true) +-- Iteration 2 -- +bool(false) +-- Iteration 3 -- +bool(true) +-- Iteration 4 -- +bool(false) + +*** Testing var_dump() on array variables *** +-- Iteration 1 -- +array(0) { +} +-- Iteration 2 -- +array(1) { + [0]=> + NULL +} +-- Iteration 3 -- +array(1) { + [0]=> + NULL +} +-- Iteration 4 -- +array(1) { + [0]=> + bool(true) +} +-- Iteration 5 -- +array(1) { + [0]=> + string(0) "" +} +-- Iteration 6 -- +array(1) { + [0]=> + string(0) "" +} +-- Iteration 7 -- +array(2) { + [0]=> + array(0) { + } + [1]=> + array(0) { + } +} +-- Iteration 8 -- +array(2) { + [0]=> + array(2) { + [0]=> + int(1) + [1]=> + int(2) + } + [1]=> + array(2) { + [0]=> + string(1) "a" + [1]=> + string(1) "b" + } +} +-- Iteration 9 -- +array(1) { + [1]=> + string(3) "One" +} +-- Iteration 10 -- +array(1) { + ["test"]=> + string(8) "is_array" +} +-- Iteration 11 -- +array(1) { + [0]=> + int(0) +} +-- Iteration 12 -- +array(1) { + [0]=> + int(-1) +} +-- Iteration 13 -- +array(2) { + [0]=> + float(10.5) + [1]=> + float(5.6) +} +-- Iteration 14 -- +array(2) { + [0]=> + string(6) "string" + [1]=> + string(4) "test" +} +-- Iteration 15 -- +array(2) { + [0]=> + string(6) "string" + [1]=> + string(4) "test" +} + +*** Testing var_dump() on object variables *** +-- Iteration 1 -- +object(object_class)#6 (7) { + ["value"]=> + int(50) + ["public_var1"]=> + int(10) + ["private_var1":"object_class":private]=> + int(20) + ["private_var2":"object_class":private]=> + int(21) + ["protected_var1":protected]=> + string(8) "string_1" + ["protected_var2":protected]=> + string(8) "string_2" + ["public_var2"]=> + int(11) +} +-- Iteration 2 -- +object(no_member_class)#7 (0) { +} +-- Iteration 3 -- +object(contains_object_class)#8 (7) { + ["p"]=> + int(30) + ["class_object1"]=> + object(object_class)#9 (7) { + ["value"]=> + int(50) + ["public_var1"]=> + int(10) + ["private_var1":"object_class":private]=> + int(20) + ["private_var2":"object_class":private]=> + int(21) + ["protected_var1":protected]=> + string(8) "string_1" + ["protected_var2":protected]=> + string(8) "string_2" + ["public_var2"]=> + int(11) + } + ["class_object2"]=> + object(object_class)#10 (7) { + ["value"]=> + int(50) + ["public_var1"]=> + int(10) + ["private_var1":"object_class":private]=> + int(20) + ["private_var2":"object_class":private]=> + int(21) + ["protected_var1":protected]=> + string(8) "string_1" + ["protected_var2":protected]=> + string(8) "string_2" + ["public_var2"]=> + int(11) + } + ["class_object3":"contains_object_class":private]=> + object(object_class)#9 (7) { + ["value"]=> + int(50) + ["public_var1"]=> + int(10) + ["private_var1":"object_class":private]=> + int(20) + ["private_var2":"object_class":private]=> + int(21) + ["protected_var1":protected]=> + string(8) "string_1" + ["protected_var2":protected]=> + string(8) "string_2" + ["public_var2"]=> + int(11) + } + ["class_object4":protected]=> + object(object_class)#10 (7) { + ["value"]=> + int(50) + ["public_var1"]=> + int(10) + ["private_var1":"object_class":private]=> + int(20) + ["private_var2":"object_class":private]=> + int(21) + ["protected_var1":protected]=> + string(8) "string_1" + ["protected_var2":protected]=> + string(8) "string_2" + ["public_var2"]=> + int(11) + } + ["no_member_class_object"]=> + object(no_member_class)#11 (0) { + } + ["class_object5"]=> + object(contains_object_class)#8 (7) { + ["p"]=> + int(30) + ["class_object1"]=> + object(object_class)#9 (7) { + ["value"]=> + int(50) + ["public_var1"]=> + int(10) + ["private_var1":"object_class":private]=> + int(20) + ["private_var2":"object_class":private]=> + int(21) + ["protected_var1":protected]=> + string(8) "string_1" + ["protected_var2":protected]=> + string(8) "string_2" + ["public_var2"]=> + int(11) + } + ["class_object2"]=> + object(object_class)#10 (7) { + ["value"]=> + int(50) + ["public_var1"]=> + int(10) + ["private_var1":"object_class":private]=> + int(20) + ["private_var2":"object_class":private]=> + int(21) + ["protected_var1":protected]=> + string(8) "string_1" + ["protected_var2":protected]=> + string(8) "string_2" + ["public_var2"]=> + int(11) + } + ["class_object3":"contains_object_class":private]=> + object(object_class)#9 (7) { + ["value"]=> + int(50) + ["public_var1"]=> + int(10) + ["private_var1":"object_class":private]=> + int(20) + ["private_var2":"object_class":private]=> + int(21) + ["protected_var1":protected]=> + string(8) "string_1" + ["protected_var2":protected]=> + string(8) "string_2" + ["public_var2"]=> + int(11) + } + ["class_object4":protected]=> + object(object_class)#10 (7) { + ["value"]=> + int(50) + ["public_var1"]=> + int(10) + ["private_var1":"object_class":private]=> + int(20) + ["private_var2":"object_class":private]=> + int(21) + ["protected_var1":protected]=> + string(8) "string_1" + ["protected_var2":protected]=> + string(8) "string_2" + ["public_var2"]=> + int(11) + } + ["no_member_class_object"]=> + object(no_member_class)#11 (0) { + } + ["class_object5"]=> + *RECURSION* + } +} +-- Iteration 4 -- +object(contains_object_class)#1 (7) { + ["p"]=> + int(30) + ["class_object1"]=> + object(object_class)#2 (7) { + ["value"]=> + int(50) + ["public_var1"]=> + int(10) + ["private_var1":"object_class":private]=> + int(20) + ["private_var2":"object_class":private]=> + int(21) + ["protected_var1":protected]=> + string(8) "string_1" + ["protected_var2":protected]=> + string(8) "string_2" + ["public_var2"]=> + int(11) + } + ["class_object2"]=> + object(object_class)#3 (7) { + ["value"]=> + int(50) + ["public_var1"]=> + int(10) + ["private_var1":"object_class":private]=> + int(20) + ["private_var2":"object_class":private]=> + int(21) + ["protected_var1":protected]=> + string(8) "string_1" + ["protected_var2":protected]=> + string(8) "string_2" + ["public_var2"]=> + int(11) + } + ["class_object3":"contains_object_class":private]=> + object(object_class)#2 (7) { + ["value"]=> + int(50) + ["public_var1"]=> + int(10) + ["private_var1":"object_class":private]=> + int(20) + ["private_var2":"object_class":private]=> + int(21) + ["protected_var1":protected]=> + string(8) "string_1" + ["protected_var2":protected]=> + string(8) "string_2" + ["public_var2"]=> + int(11) + } + ["class_object4":protected]=> + object(object_class)#3 (7) { + ["value"]=> + int(50) + ["public_var1"]=> + int(10) + ["private_var1":"object_class":private]=> + int(20) + ["private_var2":"object_class":private]=> + int(21) + ["protected_var1":protected]=> + string(8) "string_1" + ["protected_var2":protected]=> + string(8) "string_2" + ["public_var2"]=> + int(11) + } + ["no_member_class_object"]=> + object(no_member_class)#4 (0) { + } + ["class_object5"]=> + object(contains_object_class)#1 (7) { + ["p"]=> + int(30) + ["class_object1"]=> + object(object_class)#2 (7) { + ["value"]=> + int(50) + ["public_var1"]=> + int(10) + ["private_var1":"object_class":private]=> + int(20) + ["private_var2":"object_class":private]=> + int(21) + ["protected_var1":protected]=> + string(8) "string_1" + ["protected_var2":protected]=> + string(8) "string_2" + ["public_var2"]=> + int(11) + } + ["class_object2"]=> + object(object_class)#3 (7) { + ["value"]=> + int(50) + ["public_var1"]=> + int(10) + ["private_var1":"object_class":private]=> + int(20) + ["private_var2":"object_class":private]=> + int(21) + ["protected_var1":protected]=> + string(8) "string_1" + ["protected_var2":protected]=> + string(8) "string_2" + ["public_var2"]=> + int(11) + } + ["class_object3":"contains_object_class":private]=> + object(object_class)#2 (7) { + ["value"]=> + int(50) + ["public_var1"]=> + int(10) + ["private_var1":"object_class":private]=> + int(20) + ["private_var2":"object_class":private]=> + int(21) + ["protected_var1":protected]=> + string(8) "string_1" + ["protected_var2":protected]=> + string(8) "string_2" + ["public_var2"]=> + int(11) + } + ["class_object4":protected]=> + object(object_class)#3 (7) { + ["value"]=> + int(50) + ["public_var1"]=> + int(10) + ["private_var1":"object_class":private]=> + int(20) + ["private_var2":"object_class":private]=> + int(21) + ["protected_var1":protected]=> + string(8) "string_1" + ["protected_var2":protected]=> + string(8) "string_2" + ["public_var2"]=> + int(11) + } + ["no_member_class_object"]=> + object(no_member_class)#4 (0) { + } + ["class_object5"]=> + *RECURSION* + } +} +-- Iteration 5 -- +object(object_class)#2 (7) { + ["value"]=> + int(50) + ["public_var1"]=> + int(10) + ["private_var1":"object_class":private]=> + int(20) + ["private_var2":"object_class":private]=> + int(21) + ["protected_var1":protected]=> + string(8) "string_1" + ["protected_var2":protected]=> + string(8) "string_2" + ["public_var2"]=> + int(11) +} +-- Iteration 6 -- +object(object_class)#3 (7) { + ["value"]=> + int(50) + ["public_var1"]=> + int(10) + ["private_var1":"object_class":private]=> + int(20) + ["private_var2":"object_class":private]=> + int(21) + ["protected_var1":protected]=> + string(8) "string_1" + ["protected_var2":protected]=> + string(8) "string_2" + ["public_var2"]=> + int(11) +} +-- Iteration 7 -- +object(no_member_class)#4 (0) { +} +-- Iteration 8 -- +object(object_class)#5 (7) { + ["value"]=> + int(50) + ["public_var1"]=> + int(10) + ["private_var1":"object_class":private]=> + int(20) + ["private_var2":"object_class":private]=> + int(21) + ["protected_var1":protected]=> + string(8) "string_1" + ["protected_var2":protected]=> + string(8) "string_2" + ["public_var2"]=> + int(11) +} +-- Iteration 9 -- +NULL + +** Testing var_dump() on objects having circular reference ** +object(object_class)#13 (8) { + ["value"]=> + int(50) + ["public_var1"]=> + int(10) + ["private_var1":"object_class":private]=> + int(20) + ["private_var2":"object_class":private]=> + int(21) + ["protected_var1":protected]=> + string(8) "string_1" + ["protected_var2":protected]=> + string(8) "string_2" + ["public_var2"]=> + int(11) + ["obj"]=> + &object(object_class)#12 (8) { + ["value"]=> + int(50) + ["public_var1"]=> + int(10) + ["private_var1":"object_class":private]=> + int(20) + ["private_var2":"object_class":private]=> + int(21) + ["protected_var1":protected]=> + string(8) "string_1" + ["protected_var2":protected]=> + string(8) "string_2" + ["public_var2"]=> + int(11) + ["obj"]=> + &object(object_class)#13 (8) { + ["value"]=> + int(50) + ["public_var1"]=> + int(10) + ["private_var1":"object_class":private]=> + int(20) + ["private_var2":"object_class":private]=> + int(21) + ["protected_var1":protected]=> + string(8) "string_1" + ["protected_var2":protected]=> + string(8) "string_2" + ["public_var2"]=> + int(11) + ["obj"]=> + &object(object_class)#12 (8) { + ["value"]=> + int(50) + ["public_var1"]=> + int(10) + ["private_var1":"object_class":private]=> + int(20) + ["private_var2":"object_class":private]=> + int(21) + ["protected_var1":protected]=> + string(8) "string_1" + ["protected_var2":protected]=> + string(8) "string_2" + ["public_var2"]=> + int(11) + ["obj"]=> + *RECURSION* + } + } + } +} + +*** Testing var_dump() on resources *** +-- Iteration 1 -- +resource(5) of type (stream) +-- Iteration 2 -- +resource(6) of type (stream) + +*** Testing var_dump() on different combinations of scalar + and non-scalar variables *** +-- Iteration 1 -- +array(3) { + [0]=> + int(123) + [1]=> + float(-1.2345) + [2]=> + string(1) "a" +} +-- Iteration 2 -- +array(4) { + [0]=> + string(1) "d" + [1]=> + array(3) { + [0]=> + int(1) + [1]=> + int(3) + [2]=> + int(5) + } + [2]=> + bool(true) + [3]=> + NULL +} +-- Iteration 3 -- +array(4) { + [0]=> + object(no_member_class)#14 (0) { + } + [1]=> + array(0) { + } + [2]=> + bool(false) + [3]=> + int(0) +} +-- Iteration 4 -- +array(6) { + [0]=> + float(0) + [1]=> + string(11) "Where am I?" + [2]=> + array(3) { + [0]=> + int(7) + [1]=> + int(8) + [2]=> + int(9) + } + [3]=> + bool(true) + [4]=> + string(1) "A" + [5]=> + int(987654321) +} +-- Iteration 5 -- +array(4) { + [0]=> + NULL + [1]=> + float(20000000000) + [2]=> + float(79.1) + [3]=> + float(4.599998) +} +-- Iteration 6 -- +array(4) { + [0]=> + string(27) "array(1,2,3,4)1.0000002TRUE" + [1]=> + NULL + [2]=> + float(4611333) + [3]=> + string(5) "/00\7" +} + +*** Testing var_dump() on miscelleneous input arguments *** +-- Iteration 1 -- +NULL +-- Iteration 2 -- +NULL +-- Iteration 3 -- +NULL +-- Iteration 4 -- +NULL + +*** Testing var_dump() on multiple arguments *** +array(15) { + [0]=> + int(0) + [1]=> + int(83) + [2]=> + int(123000000) + [3]=> + int(-83) + [4]=> + int(-12300000) + [5]=> + array(10) { + [0]=> + int(1) + [1]=> + int(2) + [2]=> + int(3) + [3]=> + int(4) + [4]=> + int(5) + [5]=> + int(6) + [6]=> + int(7) + [7]=> + int(8) + [8]=> + int(9) + [9]=> + int(10) + } + [6]=> + array(10) { + [0]=> + int(-1) + [1]=> + int(-2) + [2]=> + int(-3) + [3]=> + int(-4) + [4]=> + int(-5) + [5]=> + int(-6) + [6]=> + int(-7) + [7]=> + int(-8) + [8]=> + int(-9) + [9]=> + int(-10) + } + [7]=> + int(2147483647) + [8]=> + int(2147483648) + [9]=> + int(-2147483648) + [10]=> + int(-2147483647) + [11]=> + int(2147483647) + [12]=> + int(-2147483648) + [13]=> + int(2147483647) + [14]=> + int(-2147483648) +} +array(32) { + [0]=> + float(0) + [1]=> + float(0) + [2]=> + float(1.234) + [3]=> + float(-1.234) + [4]=> + float(-2) + [5]=> + float(2) + [6]=> + float(-0.5) + [7]=> + float(0.567) + [8]=> + float(-0.00067) + [9]=> + float(-670) + [10]=> + float(670) + [11]=> + float(670) + [12]=> + float(-0.00410003) + [13]=> + float(-4100.03) + [14]=> + float(0.004100003) + [15]=> + float(4100.003) + [16]=> + float(100000) + [17]=> + float(-100000) + [18]=> + float(1.0E-5) + [19]=> + float(-1.0E-5) + [20]=> + float(100000) + [21]=> + float(-100000) + [22]=> + float(100000) + [23]=> + float(-100000) + [24]=> + float(100000) + [25]=> + float(-100000) + [26]=> + float(1.0E-5) + [27]=> + float(-1.0E-5) + [28]=> + int(-2147483649) + [29]=> + int(2147483649) + [30]=> + int(2147483649) + [31]=> + int(-2147483649) +} +array(14) { + [0]=> + string(0) "" + [1]=> + string(0) "" + [2]=> + string(1) " " + [3]=> + string(1) " " + [4]=> + string(1) "0" + [5]=> + string(1) "" + [6]=> + string(2) "\0" + [7]=> + string(1) " " + [8]=> + string(2) "\t" + [9]=> + string(3) "PHP" + [10]=> + string(3) "PHP" + [11]=> + string(29) "abcdn12340567800efgh\xijkl" + [12]=> + string(34) "abcdefghijklmnop0qrstuvwx0yz" + [13]=> + string(22) "1234 +5678 + 9100 +abcda" +} +array(15) { + [0]=> + array(0) { + } + [1]=> + array(1) { + [0]=> + NULL + } + [2]=> + array(1) { + [0]=> + NULL + } + [3]=> + array(1) { + [0]=> + bool(true) + } + [4]=> + array(1) { + [0]=> + string(0) "" + } + [5]=> + array(1) { + [0]=> + string(0) "" + } + [6]=> + array(2) { + [0]=> + array(0) { + } + [1]=> + array(0) { + } + } + [7]=> + array(2) { + [0]=> + array(2) { + [0]=> + int(1) + [1]=> + int(2) + } + [1]=> + array(2) { + [0]=> + string(1) "a" + [1]=> + string(1) "b" + } + } + [8]=> + array(1) { + [1]=> + string(3) "One" + } + [9]=> + array(1) { + ["test"]=> + string(8) "is_array" + } + [10]=> + array(1) { + [0]=> + int(0) + } + [11]=> + array(1) { + [0]=> + int(-1) + } + [12]=> + array(2) { + [0]=> + float(10.5) + [1]=> + float(5.6) + } + [13]=> + array(2) { + [0]=> + string(6) "string" + [1]=> + string(4) "test" + } + [14]=> + array(2) { + [0]=> + string(6) "string" + [1]=> + string(4) "test" + } +} +array(4) { + [0]=> + bool(true) + [1]=> + bool(false) + [2]=> + bool(true) + [3]=> + bool(false) +} +array(2) { + [0]=> + resource(5) of type (stream) + [1]=> + resource(6) of type (stream) +} +array(9) { + [0]=> + object(object_class)#6 (7) { + ["value"]=> + int(50) + ["public_var1"]=> + int(10) + ["private_var1":"object_class":private]=> + int(20) + ["private_var2":"object_class":private]=> + int(21) + ["protected_var1":protected]=> + string(8) "string_1" + ["protected_var2":protected]=> + string(8) "string_2" + ["public_var2"]=> + int(11) + } + [1]=> + object(no_member_class)#7 (0) { + } + [2]=> + object(contains_object_class)#8 (7) { + ["p"]=> + int(30) + ["class_object1"]=> + object(object_class)#9 (7) { + ["value"]=> + int(50) + ["public_var1"]=> + int(10) + ["private_var1":"object_class":private]=> + int(20) + ["private_var2":"object_class":private]=> + int(21) + ["protected_var1":protected]=> + string(8) "string_1" + ["protected_var2":protected]=> + string(8) "string_2" + ["public_var2"]=> + int(11) + } + ["class_object2"]=> + object(object_class)#10 (7) { + ["value"]=> + int(50) + ["public_var1"]=> + int(10) + ["private_var1":"object_class":private]=> + int(20) + ["private_var2":"object_class":private]=> + int(21) + ["protected_var1":protected]=> + string(8) "string_1" + ["protected_var2":protected]=> + string(8) "string_2" + ["public_var2"]=> + int(11) + } + ["class_object3":"contains_object_class":private]=> + object(object_class)#9 (7) { + ["value"]=> + int(50) + ["public_var1"]=> + int(10) + ["private_var1":"object_class":private]=> + int(20) + ["private_var2":"object_class":private]=> + int(21) + ["protected_var1":protected]=> + string(8) "string_1" + ["protected_var2":protected]=> + string(8) "string_2" + ["public_var2"]=> + int(11) + } + ["class_object4":protected]=> + object(object_class)#10 (7) { + ["value"]=> + int(50) + ["public_var1"]=> + int(10) + ["private_var1":"object_class":private]=> + int(20) + ["private_var2":"object_class":private]=> + int(21) + ["protected_var1":protected]=> + string(8) "string_1" + ["protected_var2":protected]=> + string(8) "string_2" + ["public_var2"]=> + int(11) + } + ["no_member_class_object"]=> + object(no_member_class)#11 (0) { + } + ["class_object5"]=> + object(contains_object_class)#8 (7) { + ["p"]=> + int(30) + ["class_object1"]=> + object(object_class)#9 (7) { + ["value"]=> + int(50) + ["public_var1"]=> + int(10) + ["private_var1":"object_class":private]=> + int(20) + ["private_var2":"object_class":private]=> + int(21) + ["protected_var1":protected]=> + string(8) "string_1" + ["protected_var2":protected]=> + string(8) "string_2" + ["public_var2"]=> + int(11) + } + ["class_object2"]=> + object(object_class)#10 (7) { + ["value"]=> + int(50) + ["public_var1"]=> + int(10) + ["private_var1":"object_class":private]=> + int(20) + ["private_var2":"object_class":private]=> + int(21) + ["protected_var1":protected]=> + string(8) "string_1" + ["protected_var2":protected]=> + string(8) "string_2" + ["public_var2"]=> + int(11) + } + ["class_object3":"contains_object_class":private]=> + object(object_class)#9 (7) { + ["value"]=> + int(50) + ["public_var1"]=> + int(10) + ["private_var1":"object_class":private]=> + int(20) + ["private_var2":"object_class":private]=> + int(21) + ["protected_var1":protected]=> + string(8) "string_1" + ["protected_var2":protected]=> + string(8) "string_2" + ["public_var2"]=> + int(11) + } + ["class_object4":protected]=> + object(object_class)#10 (7) { + ["value"]=> + int(50) + ["public_var1"]=> + int(10) + ["private_var1":"object_class":private]=> + int(20) + ["private_var2":"object_class":private]=> + int(21) + ["protected_var1":protected]=> + string(8) "string_1" + ["protected_var2":protected]=> + string(8) "string_2" + ["public_var2"]=> + int(11) + } + ["no_member_class_object"]=> + object(no_member_class)#11 (0) { + } + ["class_object5"]=> + *RECURSION* + } + } + [3]=> + object(contains_object_class)#1 (7) { + ["p"]=> + int(30) + ["class_object1"]=> + object(object_class)#2 (7) { + ["value"]=> + int(50) + ["public_var1"]=> + int(10) + ["private_var1":"object_class":private]=> + int(20) + ["private_var2":"object_class":private]=> + int(21) + ["protected_var1":protected]=> + string(8) "string_1" + ["protected_var2":protected]=> + string(8) "string_2" + ["public_var2"]=> + int(11) + } + ["class_object2"]=> + object(object_class)#3 (7) { + ["value"]=> + int(50) + ["public_var1"]=> + int(10) + ["private_var1":"object_class":private]=> + int(20) + ["private_var2":"object_class":private]=> + int(21) + ["protected_var1":protected]=> + string(8) "string_1" + ["protected_var2":protected]=> + string(8) "string_2" + ["public_var2"]=> + int(11) + } + ["class_object3":"contains_object_class":private]=> + object(object_class)#2 (7) { + ["value"]=> + int(50) + ["public_var1"]=> + int(10) + ["private_var1":"object_class":private]=> + int(20) + ["private_var2":"object_class":private]=> + int(21) + ["protected_var1":protected]=> + string(8) "string_1" + ["protected_var2":protected]=> + string(8) "string_2" + ["public_var2"]=> + int(11) + } + ["class_object4":protected]=> + object(object_class)#3 (7) { + ["value"]=> + int(50) + ["public_var1"]=> + int(10) + ["private_var1":"object_class":private]=> + int(20) + ["private_var2":"object_class":private]=> + int(21) + ["protected_var1":protected]=> + string(8) "string_1" + ["protected_var2":protected]=> + string(8) "string_2" + ["public_var2"]=> + int(11) + } + ["no_member_class_object"]=> + object(no_member_class)#4 (0) { + } + ["class_object5"]=> + object(contains_object_class)#1 (7) { + ["p"]=> + int(30) + ["class_object1"]=> + object(object_class)#2 (7) { + ["value"]=> + int(50) + ["public_var1"]=> + int(10) + ["private_var1":"object_class":private]=> + int(20) + ["private_var2":"object_class":private]=> + int(21) + ["protected_var1":protected]=> + string(8) "string_1" + ["protected_var2":protected]=> + string(8) "string_2" + ["public_var2"]=> + int(11) + } + ["class_object2"]=> + object(object_class)#3 (7) { + ["value"]=> + int(50) + ["public_var1"]=> + int(10) + ["private_var1":"object_class":private]=> + int(20) + ["private_var2":"object_class":private]=> + int(21) + ["protected_var1":protected]=> + string(8) "string_1" + ["protected_var2":protected]=> + string(8) "string_2" + ["public_var2"]=> + int(11) + } + ["class_object3":"contains_object_class":private]=> + object(object_class)#2 (7) { + ["value"]=> + int(50) + ["public_var1"]=> + int(10) + ["private_var1":"object_class":private]=> + int(20) + ["private_var2":"object_class":private]=> + int(21) + ["protected_var1":protected]=> + string(8) "string_1" + ["protected_var2":protected]=> + string(8) "string_2" + ["public_var2"]=> + int(11) + } + ["class_object4":protected]=> + object(object_class)#3 (7) { + ["value"]=> + int(50) + ["public_var1"]=> + int(10) + ["private_var1":"object_class":private]=> + int(20) + ["private_var2":"object_class":private]=> + int(21) + ["protected_var1":protected]=> + string(8) "string_1" + ["protected_var2":protected]=> + string(8) "string_2" + ["public_var2"]=> + int(11) + } + ["no_member_class_object"]=> + object(no_member_class)#4 (0) { + } + ["class_object5"]=> + *RECURSION* + } + } + [4]=> + object(object_class)#2 (7) { + ["value"]=> + int(50) + ["public_var1"]=> + int(10) + ["private_var1":"object_class":private]=> + int(20) + ["private_var2":"object_class":private]=> + int(21) + ["protected_var1":protected]=> + string(8) "string_1" + ["protected_var2":protected]=> + string(8) "string_2" + ["public_var2"]=> + int(11) + } + [5]=> + object(object_class)#3 (7) { + ["value"]=> + int(50) + ["public_var1"]=> + int(10) + ["private_var1":"object_class":private]=> + int(20) + ["private_var2":"object_class":private]=> + int(21) + ["protected_var1":protected]=> + string(8) "string_1" + ["protected_var2":protected]=> + string(8) "string_2" + ["public_var2"]=> + int(11) + } + [6]=> + object(no_member_class)#4 (0) { + } + [7]=> + object(object_class)#5 (7) { + ["value"]=> + int(50) + ["public_var1"]=> + int(10) + ["private_var1":"object_class":private]=> + int(20) + ["private_var2":"object_class":private]=> + int(21) + ["protected_var1":protected]=> + string(8) "string_1" + ["protected_var2":protected]=> + string(8) "string_2" + ["public_var2"]=> + int(11) + } + [8]=> + NULL +} +array(4) { + [0]=> + NULL + [1]=> + NULL + [2]=> + NULL + [3]=> + NULL +} +array(6) { + [0]=> + array(3) { + [0]=> + int(123) + [1]=> + float(-1.2345) + [2]=> + string(1) "a" + } + [1]=> + array(4) { + [0]=> + string(1) "d" + [1]=> + array(3) { + [0]=> + int(1) + [1]=> + int(3) + [2]=> + int(5) + } + [2]=> + bool(true) + [3]=> + NULL + } + [2]=> + array(4) { + [0]=> + object(no_member_class)#14 (0) { + } + [1]=> + array(0) { + } + [2]=> + bool(false) + [3]=> + int(0) + } + [3]=> + array(6) { + [0]=> + float(0) + [1]=> + string(11) "Where am I?" + [2]=> + array(3) { + [0]=> + int(7) + [1]=> + int(8) + [2]=> + int(9) + } + [3]=> + bool(true) + [4]=> + string(1) "A" + [5]=> + int(987654321) + } + [4]=> + array(4) { + [0]=> + NULL + [1]=> + float(20000000000) + [2]=> + float(79.1) + [3]=> + float(4.599998) + } + [5]=> + array(4) { + [0]=> + string(27) "array(1,2,3,4)1.0000002TRUE" + [1]=> + NULL + [2]=> + float(4611333) + [3]=> + string(5) "/00\7" + } +} + +*** Testing var_dump() on anonymous functions *** +New anonymous function: lambda_1 +string(9) "2 * 3 = 6" +string(9) "lambda_2" + +*** Testing error conditions *** + +Warning: Wrong parameter count for var_dump() in %s on line %d +Done +--UEXPECTF-- +*** Testing var_dump() on integer variables *** +-- Iteration 1 -- +int(0) +-- Iteration 2 -- +int(83) +-- Iteration 3 -- +int(123000000) +-- Iteration 4 -- +int(-83) +-- Iteration 5 -- +int(-12300000) +-- Iteration 6 -- +array(10) { + [0]=> + int(1) + [1]=> + int(2) + [2]=> + int(3) + [3]=> + int(4) + [4]=> + int(5) + [5]=> + int(6) + [6]=> + int(7) + [7]=> + int(8) + [8]=> + int(9) + [9]=> + int(10) +} +-- Iteration 7 -- +array(10) { + [0]=> + int(-1) + [1]=> + int(-2) + [2]=> + int(-3) + [3]=> + int(-4) + [4]=> + int(-5) + [5]=> + int(-6) + [6]=> + int(-7) + [7]=> + int(-8) + [8]=> + int(-9) + [9]=> + int(-10) +} +-- Iteration 8 -- +int(2147483647) +-- Iteration 9 -- +int(2147483648) +-- Iteration 10 -- +int(-2147483648) +-- Iteration 11 -- +int(-2147483647) +-- Iteration 12 -- +int(2147483647) +-- Iteration 13 -- +int(-2147483648) +-- Iteration 14 -- +int(2147483647) +-- Iteration 15 -- +int(-2147483648) + +*** Testing var_dump() on float variables *** +-- Iteration 1 -- +float(0) +-- Iteration 2 -- +float(0) +-- Iteration 3 -- +float(1.234) +-- Iteration 4 -- +float(-1.234) +-- Iteration 5 -- +float(-2) +-- Iteration 6 -- +float(2) +-- Iteration 7 -- +float(-0.5) +-- Iteration 8 -- +float(0.567) +-- Iteration 9 -- +float(-0.00067) +-- Iteration 10 -- +float(-670) +-- Iteration 11 -- +float(670) +-- Iteration 12 -- +float(670) +-- Iteration 13 -- +float(-0.00410003) +-- Iteration 14 -- +float(-4100.03) +-- Iteration 15 -- +float(0.004100003) +-- Iteration 16 -- +float(4100.003) +-- Iteration 17 -- +float(100000) +-- Iteration 18 -- +float(-100000) +-- Iteration 19 -- +float(1.0E-5) +-- Iteration 20 -- +float(-1.0E-5) +-- Iteration 21 -- +float(100000) +-- Iteration 22 -- +float(-100000) +-- Iteration 23 -- +float(100000) +-- Iteration 24 -- +float(-100000) +-- Iteration 25 -- +float(100000) +-- Iteration 26 -- +float(-100000) +-- Iteration 27 -- +float(1.0E-5) +-- Iteration 28 -- +float(-1.0E-5) +-- Iteration 29 -- +int(-2147483649) +-- Iteration 30 -- +int(2147483649) +-- Iteration 31 -- +int(2147483649) +-- Iteration 32 -- +int(-2147483649) + +*** Testing var_dump() on string variables *** +-- Iteration 1 -- +unicode(0) "" +-- Iteration 2 -- +unicode(0) "" +-- Iteration 3 -- +unicode(1) " " +-- Iteration 4 -- +unicode(1) " " +-- Iteration 5 -- +unicode(1) "0" +-- Iteration 6 -- +unicode(1) "" +-- Iteration 7 -- +unicode(2) "\0" +-- Iteration 8 -- +unicode(1) " " +-- Iteration 9 -- +unicode(2) "\t" +-- Iteration 10 -- +unicode(3) "PHP" +-- Iteration 11 -- +unicode(3) "PHP" +-- Iteration 12 -- +unicode(29) "abcdn12340567800efgh\xijkl" +-- Iteration 13 -- +unicode(34) "abcdefghijklmnop0qrstuvwx0yz" +-- Iteration 14 -- +unicode(22) "1234 +5678 + 9100 +abcda" + +*** Testing var_dump() on boolean variables *** +-- Iteration 1 -- +bool(true) +-- Iteration 2 -- +bool(false) +-- Iteration 3 -- +bool(true) +-- Iteration 4 -- +bool(false) + +*** Testing var_dump() on array variables *** +-- Iteration 1 -- +array(0) { +} +-- Iteration 2 -- +array(1) { + [0]=> + NULL +} +-- Iteration 3 -- +array(1) { + [0]=> + NULL +} +-- Iteration 4 -- +array(1) { + [0]=> + bool(true) +} +-- Iteration 5 -- +array(1) { + [0]=> + unicode(0) "" +} +-- Iteration 6 -- +array(1) { + [0]=> + unicode(0) "" +} +-- Iteration 7 -- +array(2) { + [0]=> + array(0) { + } + [1]=> + array(0) { + } +} +-- Iteration 8 -- +array(2) { + [0]=> + array(2) { + [0]=> + int(1) + [1]=> + int(2) + } + [1]=> + array(2) { + [0]=> + unicode(1) "a" + [1]=> + unicode(1) "b" + } +} +-- Iteration 9 -- +array(1) { + [1]=> + unicode(3) "One" +} +-- Iteration 10 -- +array(1) { + [u"test"]=> + unicode(8) "is_array" +} +-- Iteration 11 -- +array(1) { + [0]=> + int(0) +} +-- Iteration 12 -- +array(1) { + [0]=> + int(-1) +} +-- Iteration 13 -- +array(2) { + [0]=> + float(10.5) + [1]=> + float(5.6) +} +-- Iteration 14 -- +array(2) { + [0]=> + unicode(6) "string" + [1]=> + unicode(4) "test" +} +-- Iteration 15 -- +array(2) { + [0]=> + unicode(6) "string" + [1]=> + unicode(4) "test" +} + +*** Testing var_dump() on object variables *** +-- Iteration 1 -- +object(object_class)#6 (7) { + [u"value"]=> + int(50) + [u"public_var1"]=> + int(10) + [u"private_var1":u"object_class":private]=> + int(20) + [u"private_var2":u"object_class":private]=> + int(21) + [u"protected_var1":protected]=> + unicode(8) "string_1" + [u"protected_var2":protected]=> + unicode(8) "string_2" + [u"public_var2"]=> + int(11) +} +-- Iteration 2 -- +object(no_member_class)#7 (0) { +} +-- Iteration 3 -- +object(contains_object_class)#8 (7) { + [u"p"]=> + int(30) + [u"class_object1"]=> + object(object_class)#9 (7) { + [u"value"]=> + int(50) + [u"public_var1"]=> + int(10) + [u"private_var1":u"object_class":private]=> + int(20) + [u"private_var2":u"object_class":private]=> + int(21) + [u"protected_var1":protected]=> + unicode(8) "string_1" + [u"protected_var2":protected]=> + unicode(8) "string_2" + [u"public_var2"]=> + int(11) + } + [u"class_object2"]=> + object(object_class)#10 (7) { + [u"value"]=> + int(50) + [u"public_var1"]=> + int(10) + [u"private_var1":u"object_class":private]=> + int(20) + [u"private_var2":u"object_class":private]=> + int(21) + [u"protected_var1":protected]=> + unicode(8) "string_1" + [u"protected_var2":protected]=> + unicode(8) "string_2" + [u"public_var2"]=> + int(11) + } + [u"class_object3":u"contains_object_class":private]=> + object(object_class)#9 (7) { + [u"value"]=> + int(50) + [u"public_var1"]=> + int(10) + [u"private_var1":u"object_class":private]=> + int(20) + [u"private_var2":u"object_class":private]=> + int(21) + [u"protected_var1":protected]=> + unicode(8) "string_1" + [u"protected_var2":protected]=> + unicode(8) "string_2" + [u"public_var2"]=> + int(11) + } + [u"class_object4":protected]=> + object(object_class)#10 (7) { + [u"value"]=> + int(50) + [u"public_var1"]=> + int(10) + [u"private_var1":u"object_class":private]=> + int(20) + [u"private_var2":u"object_class":private]=> + int(21) + [u"protected_var1":protected]=> + unicode(8) "string_1" + [u"protected_var2":protected]=> + unicode(8) "string_2" + [u"public_var2"]=> + int(11) + } + [u"no_member_class_object"]=> + object(no_member_class)#11 (0) { + } + [u"class_object5"]=> + object(contains_object_class)#8 (7) { + [u"p"]=> + int(30) + [u"class_object1"]=> + object(object_class)#9 (7) { + [u"value"]=> + int(50) + [u"public_var1"]=> + int(10) + [u"private_var1":u"object_class":private]=> + int(20) + [u"private_var2":u"object_class":private]=> + int(21) + [u"protected_var1":protected]=> + unicode(8) "string_1" + [u"protected_var2":protected]=> + unicode(8) "string_2" + [u"public_var2"]=> + int(11) + } + [u"class_object2"]=> + object(object_class)#10 (7) { + [u"value"]=> + int(50) + [u"public_var1"]=> + int(10) + [u"private_var1":u"object_class":private]=> + int(20) + [u"private_var2":u"object_class":private]=> + int(21) + [u"protected_var1":protected]=> + unicode(8) "string_1" + [u"protected_var2":protected]=> + unicode(8) "string_2" + [u"public_var2"]=> + int(11) + } + [u"class_object3":u"contains_object_class":private]=> + object(object_class)#9 (7) { + [u"value"]=> + int(50) + [u"public_var1"]=> + int(10) + [u"private_var1":u"object_class":private]=> + int(20) + [u"private_var2":u"object_class":private]=> + int(21) + [u"protected_var1":protected]=> + unicode(8) "string_1" + [u"protected_var2":protected]=> + unicode(8) "string_2" + [u"public_var2"]=> + int(11) + } + [u"class_object4":protected]=> + object(object_class)#10 (7) { + [u"value"]=> + int(50) + [u"public_var1"]=> + int(10) + [u"private_var1":u"object_class":private]=> + int(20) + [u"private_var2":u"object_class":private]=> + int(21) + [u"protected_var1":protected]=> + unicode(8) "string_1" + [u"protected_var2":protected]=> + unicode(8) "string_2" + [u"public_var2"]=> + int(11) + } + [u"no_member_class_object"]=> + object(no_member_class)#11 (0) { + } + [u"class_object5"]=> + *RECURSION* + } +} +-- Iteration 4 -- +object(contains_object_class)#1 (7) { + [u"p"]=> + int(30) + [u"class_object1"]=> + object(object_class)#2 (7) { + [u"value"]=> + int(50) + [u"public_var1"]=> + int(10) + [u"private_var1":u"object_class":private]=> + int(20) + [u"private_var2":u"object_class":private]=> + int(21) + [u"protected_var1":protected]=> + unicode(8) "string_1" + [u"protected_var2":protected]=> + unicode(8) "string_2" + [u"public_var2"]=> + int(11) + } + [u"class_object2"]=> + object(object_class)#3 (7) { + [u"value"]=> + int(50) + [u"public_var1"]=> + int(10) + [u"private_var1":u"object_class":private]=> + int(20) + [u"private_var2":u"object_class":private]=> + int(21) + [u"protected_var1":protected]=> + unicode(8) "string_1" + [u"protected_var2":protected]=> + unicode(8) "string_2" + [u"public_var2"]=> + int(11) + } + [u"class_object3":u"contains_object_class":private]=> + object(object_class)#2 (7) { + [u"value"]=> + int(50) + [u"public_var1"]=> + int(10) + [u"private_var1":u"object_class":private]=> + int(20) + [u"private_var2":u"object_class":private]=> + int(21) + [u"protected_var1":protected]=> + unicode(8) "string_1" + [u"protected_var2":protected]=> + unicode(8) "string_2" + [u"public_var2"]=> + int(11) + } + [u"class_object4":protected]=> + object(object_class)#3 (7) { + [u"value"]=> + int(50) + [u"public_var1"]=> + int(10) + [u"private_var1":u"object_class":private]=> + int(20) + [u"private_var2":u"object_class":private]=> + int(21) + [u"protected_var1":protected]=> + unicode(8) "string_1" + [u"protected_var2":protected]=> + unicode(8) "string_2" + [u"public_var2"]=> + int(11) + } + [u"no_member_class_object"]=> + object(no_member_class)#4 (0) { + } + [u"class_object5"]=> + object(contains_object_class)#1 (7) { + [u"p"]=> + int(30) + [u"class_object1"]=> + object(object_class)#2 (7) { + [u"value"]=> + int(50) + [u"public_var1"]=> + int(10) + [u"private_var1":u"object_class":private]=> + int(20) + [u"private_var2":u"object_class":private]=> + int(21) + [u"protected_var1":protected]=> + unicode(8) "string_1" + [u"protected_var2":protected]=> + unicode(8) "string_2" + [u"public_var2"]=> + int(11) + } + [u"class_object2"]=> + object(object_class)#3 (7) { + [u"value"]=> + int(50) + [u"public_var1"]=> + int(10) + [u"private_var1":u"object_class":private]=> + int(20) + [u"private_var2":u"object_class":private]=> + int(21) + [u"protected_var1":protected]=> + unicode(8) "string_1" + [u"protected_var2":protected]=> + unicode(8) "string_2" + [u"public_var2"]=> + int(11) + } + [u"class_object3":u"contains_object_class":private]=> + object(object_class)#2 (7) { + [u"value"]=> + int(50) + [u"public_var1"]=> + int(10) + [u"private_var1":u"object_class":private]=> + int(20) + [u"private_var2":u"object_class":private]=> + int(21) + [u"protected_var1":protected]=> + unicode(8) "string_1" + [u"protected_var2":protected]=> + unicode(8) "string_2" + [u"public_var2"]=> + int(11) + } + [u"class_object4":protected]=> + object(object_class)#3 (7) { + [u"value"]=> + int(50) + [u"public_var1"]=> + int(10) + [u"private_var1":u"object_class":private]=> + int(20) + [u"private_var2":u"object_class":private]=> + int(21) + [u"protected_var1":protected]=> + unicode(8) "string_1" + [u"protected_var2":protected]=> + unicode(8) "string_2" + [u"public_var2"]=> + int(11) + } + [u"no_member_class_object"]=> + object(no_member_class)#4 (0) { + } + [u"class_object5"]=> + *RECURSION* + } +} +-- Iteration 5 -- +object(object_class)#2 (7) { + [u"value"]=> + int(50) + [u"public_var1"]=> + int(10) + [u"private_var1":u"object_class":private]=> + int(20) + [u"private_var2":u"object_class":private]=> + int(21) + [u"protected_var1":protected]=> + unicode(8) "string_1" + [u"protected_var2":protected]=> + unicode(8) "string_2" + [u"public_var2"]=> + int(11) +} +-- Iteration 6 -- +object(object_class)#3 (7) { + [u"value"]=> + int(50) + [u"public_var1"]=> + int(10) + [u"private_var1":u"object_class":private]=> + int(20) + [u"private_var2":u"object_class":private]=> + int(21) + [u"protected_var1":protected]=> + unicode(8) "string_1" + [u"protected_var2":protected]=> + unicode(8) "string_2" + [u"public_var2"]=> + int(11) +} +-- Iteration 7 -- +object(no_member_class)#4 (0) { +} +-- Iteration 8 -- +object(object_class)#5 (7) { + [u"value"]=> + int(50) + [u"public_var1"]=> + int(10) + [u"private_var1":u"object_class":private]=> + int(20) + [u"private_var2":u"object_class":private]=> + int(21) + [u"protected_var1":protected]=> + unicode(8) "string_1" + [u"protected_var2":protected]=> + unicode(8) "string_2" + [u"public_var2"]=> + int(11) +} +-- Iteration 9 -- +NULL + +** Testing var_dump() on objects having circular reference ** +object(object_class)#13 (8) { + [u"value"]=> + int(50) + [u"public_var1"]=> + int(10) + [u"private_var1":u"object_class":private]=> + int(20) + [u"private_var2":u"object_class":private]=> + int(21) + [u"protected_var1":protected]=> + unicode(8) "string_1" + [u"protected_var2":protected]=> + unicode(8) "string_2" + [u"public_var2"]=> + int(11) + [u"obj"]=> + &object(object_class)#12 (8) { + [u"value"]=> + int(50) + [u"public_var1"]=> + int(10) + [u"private_var1":u"object_class":private]=> + int(20) + [u"private_var2":u"object_class":private]=> + int(21) + [u"protected_var1":protected]=> + unicode(8) "string_1" + [u"protected_var2":protected]=> + unicode(8) "string_2" + [u"public_var2"]=> + int(11) + [u"obj"]=> + &object(object_class)#13 (8) { + [u"value"]=> + int(50) + [u"public_var1"]=> + int(10) + [u"private_var1":u"object_class":private]=> + int(20) + [u"private_var2":u"object_class":private]=> + int(21) + [u"protected_var1":protected]=> + unicode(8) "string_1" + [u"protected_var2":protected]=> + unicode(8) "string_2" + [u"public_var2"]=> + int(11) + [u"obj"]=> + &object(object_class)#12 (8) { + [u"value"]=> + int(50) + [u"public_var1"]=> + int(10) + [u"private_var1":u"object_class":private]=> + int(20) + [u"private_var2":u"object_class":private]=> + int(21) + [u"protected_var1":protected]=> + unicode(8) "string_1" + [u"protected_var2":protected]=> + unicode(8) "string_2" + [u"public_var2"]=> + int(11) + [u"obj"]=> + *RECURSION* + } + } + } +} + +*** Testing var_dump() on resources *** +-- Iteration 1 -- +resource(5) of type (stream) +-- Iteration 2 -- +resource(6) of type (stream) + +*** Testing var_dump() on different combinations of scalar + and non-scalar variables *** +-- Iteration 1 -- +array(3) { + [0]=> + int(123) + [1]=> + float(-1.2345) + [2]=> + unicode(1) "a" +} +-- Iteration 2 -- +array(4) { + [0]=> + unicode(1) "d" + [1]=> + array(3) { + [0]=> + int(1) + [1]=> + int(3) + [2]=> + int(5) + } + [2]=> + bool(true) + [3]=> + NULL +} +-- Iteration 3 -- +array(4) { + [0]=> + object(no_member_class)#14 (0) { + } + [1]=> + array(0) { + } + [2]=> + bool(false) + [3]=> + int(0) +} +-- Iteration 4 -- +array(6) { + [0]=> + float(0) + [1]=> + unicode(11) "Where am I?" + [2]=> + array(3) { + [0]=> + int(7) + [1]=> + int(8) + [2]=> + int(9) + } + [3]=> + bool(true) + [4]=> + unicode(1) "A" + [5]=> + int(987654321) +} +-- Iteration 5 -- +array(4) { + [0]=> + NULL + [1]=> + float(20000000000) + [2]=> + float(79.1) + [3]=> + float(4.599998) +} +-- Iteration 6 -- +array(4) { + [0]=> + unicode(27) "array(1,2,3,4)1.0000002TRUE" + [1]=> + NULL + [2]=> + float(4611333) + [3]=> + unicode(5) "/00\7" +} + +*** Testing var_dump() on miscelleneous input arguments *** +-- Iteration 1 -- +NULL +-- Iteration 2 -- +NULL +-- Iteration 3 -- +NULL +-- Iteration 4 -- +NULL + +*** Testing var_dump() on multiple arguments *** +array(15) { + [0]=> + int(0) + [1]=> + int(83) + [2]=> + int(123000000) + [3]=> + int(-83) + [4]=> + int(-12300000) + [5]=> + array(10) { + [0]=> + int(1) + [1]=> + int(2) + [2]=> + int(3) + [3]=> + int(4) + [4]=> + int(5) + [5]=> + int(6) + [6]=> + int(7) + [7]=> + int(8) + [8]=> + int(9) + [9]=> + int(10) + } + [6]=> + array(10) { + [0]=> + int(-1) + [1]=> + int(-2) + [2]=> + int(-3) + [3]=> + int(-4) + [4]=> + int(-5) + [5]=> + int(-6) + [6]=> + int(-7) + [7]=> + int(-8) + [8]=> + int(-9) + [9]=> + int(-10) + } + [7]=> + int(2147483647) + [8]=> + int(2147483648) + [9]=> + int(-2147483648) + [10]=> + int(-2147483647) + [11]=> + int(2147483647) + [12]=> + int(-2147483648) + [13]=> + int(2147483647) + [14]=> + int(-2147483648) +} +array(32) { + [0]=> + float(0) + [1]=> + float(0) + [2]=> + float(1.234) + [3]=> + float(-1.234) + [4]=> + float(-2) + [5]=> + float(2) + [6]=> + float(-0.5) + [7]=> + float(0.567) + [8]=> + float(-0.00067) + [9]=> + float(-670) + [10]=> + float(670) + [11]=> + float(670) + [12]=> + float(-0.00410003) + [13]=> + float(-4100.03) + [14]=> + float(0.004100003) + [15]=> + float(4100.003) + [16]=> + float(100000) + [17]=> + float(-100000) + [18]=> + float(1.0E-5) + [19]=> + float(-1.0E-5) + [20]=> + float(100000) + [21]=> + float(-100000) + [22]=> + float(100000) + [23]=> + float(-100000) + [24]=> + float(100000) + [25]=> + float(-100000) + [26]=> + float(1.0E-5) + [27]=> + float(-1.0E-5) + [28]=> + int(-2147483649) + [29]=> + int(2147483649) + [30]=> + int(2147483649) + [31]=> + int(-2147483649) +} +array(14) { + [0]=> + unicode(0) "" + [1]=> + unicode(0) "" + [2]=> + unicode(1) " " + [3]=> + unicode(1) " " + [4]=> + unicode(1) "0" + [5]=> + unicode(1) "" + [6]=> + unicode(2) "\0" + [7]=> + unicode(1) " " + [8]=> + unicode(2) "\t" + [9]=> + unicode(3) "PHP" + [10]=> + unicode(3) "PHP" + [11]=> + unicode(29) "abcdn12340567800efgh\xijkl" + [12]=> + unicode(34) "abcdefghijklmnop0qrstuvwx0yz" + [13]=> + unicode(22) "1234 +5678 + 9100 +abcda" +} +array(15) { + [0]=> + array(0) { + } + [1]=> + array(1) { + [0]=> + NULL + } + [2]=> + array(1) { + [0]=> + NULL + } + [3]=> + array(1) { + [0]=> + bool(true) + } + [4]=> + array(1) { + [0]=> + unicode(0) "" + } + [5]=> + array(1) { + [0]=> + unicode(0) "" + } + [6]=> + array(2) { + [0]=> + array(0) { + } + [1]=> + array(0) { + } + } + [7]=> + array(2) { + [0]=> + array(2) { + [0]=> + int(1) + [1]=> + int(2) + } + [1]=> + array(2) { + [0]=> + unicode(1) "a" + [1]=> + unicode(1) "b" + } + } + [8]=> + array(1) { + [1]=> + unicode(3) "One" + } + [9]=> + array(1) { + [u"test"]=> + unicode(8) "is_array" + } + [10]=> + array(1) { + [0]=> + int(0) + } + [11]=> + array(1) { + [0]=> + int(-1) + } + [12]=> + array(2) { + [0]=> + float(10.5) + [1]=> + float(5.6) + } + [13]=> + array(2) { + [0]=> + unicode(6) "string" + [1]=> + unicode(4) "test" + } + [14]=> + array(2) { + [0]=> + unicode(6) "string" + [1]=> + unicode(4) "test" + } +} +array(4) { + [0]=> + bool(true) + [1]=> + bool(false) + [2]=> + bool(true) + [3]=> + bool(false) +} +array(2) { + [0]=> + resource(5) of type (stream) + [1]=> + resource(6) of type (stream) +} +array(9) { + [0]=> + object(object_class)#6 (7) { + [u"value"]=> + int(50) + [u"public_var1"]=> + int(10) + [u"private_var1":u"object_class":private]=> + int(20) + [u"private_var2":u"object_class":private]=> + int(21) + [u"protected_var1":protected]=> + unicode(8) "string_1" + [u"protected_var2":protected]=> + unicode(8) "string_2" + [u"public_var2"]=> + int(11) + } + [1]=> + object(no_member_class)#7 (0) { + } + [2]=> + object(contains_object_class)#8 (7) { + [u"p"]=> + int(30) + [u"class_object1"]=> + object(object_class)#9 (7) { + [u"value"]=> + int(50) + [u"public_var1"]=> + int(10) + [u"private_var1":u"object_class":private]=> + int(20) + [u"private_var2":u"object_class":private]=> + int(21) + [u"protected_var1":protected]=> + unicode(8) "string_1" + [u"protected_var2":protected]=> + unicode(8) "string_2" + [u"public_var2"]=> + int(11) + } + [u"class_object2"]=> + object(object_class)#10 (7) { + [u"value"]=> + int(50) + [u"public_var1"]=> + int(10) + [u"private_var1":u"object_class":private]=> + int(20) + [u"private_var2":u"object_class":private]=> + int(21) + [u"protected_var1":protected]=> + unicode(8) "string_1" + [u"protected_var2":protected]=> + unicode(8) "string_2" + [u"public_var2"]=> + int(11) + } + [u"class_object3":u"contains_object_class":private]=> + object(object_class)#9 (7) { + [u"value"]=> + int(50) + [u"public_var1"]=> + int(10) + [u"private_var1":u"object_class":private]=> + int(20) + [u"private_var2":u"object_class":private]=> + int(21) + [u"protected_var1":protected]=> + unicode(8) "string_1" + [u"protected_var2":protected]=> + unicode(8) "string_2" + [u"public_var2"]=> + int(11) + } + [u"class_object4":protected]=> + object(object_class)#10 (7) { + [u"value"]=> + int(50) + [u"public_var1"]=> + int(10) + [u"private_var1":u"object_class":private]=> + int(20) + [u"private_var2":u"object_class":private]=> + int(21) + [u"protected_var1":protected]=> + unicode(8) "string_1" + [u"protected_var2":protected]=> + unicode(8) "string_2" + [u"public_var2"]=> + int(11) + } + [u"no_member_class_object"]=> + object(no_member_class)#11 (0) { + } + [u"class_object5"]=> + object(contains_object_class)#8 (7) { + [u"p"]=> + int(30) + [u"class_object1"]=> + object(object_class)#9 (7) { + [u"value"]=> + int(50) + [u"public_var1"]=> + int(10) + [u"private_var1":u"object_class":private]=> + int(20) + [u"private_var2":u"object_class":private]=> + int(21) + [u"protected_var1":protected]=> + unicode(8) "string_1" + [u"protected_var2":protected]=> + unicode(8) "string_2" + [u"public_var2"]=> + int(11) + } + [u"class_object2"]=> + object(object_class)#10 (7) { + [u"value"]=> + int(50) + [u"public_var1"]=> + int(10) + [u"private_var1":u"object_class":private]=> + int(20) + [u"private_var2":u"object_class":private]=> + int(21) + [u"protected_var1":protected]=> + unicode(8) "string_1" + [u"protected_var2":protected]=> + unicode(8) "string_2" + [u"public_var2"]=> + int(11) + } + [u"class_object3":u"contains_object_class":private]=> + object(object_class)#9 (7) { + [u"value"]=> + int(50) + [u"public_var1"]=> + int(10) + [u"private_var1":u"object_class":private]=> + int(20) + [u"private_var2":u"object_class":private]=> + int(21) + [u"protected_var1":protected]=> + unicode(8) "string_1" + [u"protected_var2":protected]=> + unicode(8) "string_2" + [u"public_var2"]=> + int(11) + } + [u"class_object4":protected]=> + object(object_class)#10 (7) { + [u"value"]=> + int(50) + [u"public_var1"]=> + int(10) + [u"private_var1":u"object_class":private]=> + int(20) + [u"private_var2":u"object_class":private]=> + int(21) + [u"protected_var1":protected]=> + unicode(8) "string_1" + [u"protected_var2":protected]=> + unicode(8) "string_2" + [u"public_var2"]=> + int(11) + } + [u"no_member_class_object"]=> + object(no_member_class)#11 (0) { + } + [u"class_object5"]=> + *RECURSION* + } + } + [3]=> + object(contains_object_class)#1 (7) { + [u"p"]=> + int(30) + [u"class_object1"]=> + object(object_class)#2 (7) { + [u"value"]=> + int(50) + [u"public_var1"]=> + int(10) + [u"private_var1":u"object_class":private]=> + int(20) + [u"private_var2":u"object_class":private]=> + int(21) + [u"protected_var1":protected]=> + unicode(8) "string_1" + [u"protected_var2":protected]=> + unicode(8) "string_2" + [u"public_var2"]=> + int(11) + } + [u"class_object2"]=> + object(object_class)#3 (7) { + [u"value"]=> + int(50) + [u"public_var1"]=> + int(10) + [u"private_var1":u"object_class":private]=> + int(20) + [u"private_var2":u"object_class":private]=> + int(21) + [u"protected_var1":protected]=> + unicode(8) "string_1" + [u"protected_var2":protected]=> + unicode(8) "string_2" + [u"public_var2"]=> + int(11) + } + [u"class_object3":u"contains_object_class":private]=> + object(object_class)#2 (7) { + [u"value"]=> + int(50) + [u"public_var1"]=> + int(10) + [u"private_var1":u"object_class":private]=> + int(20) + [u"private_var2":u"object_class":private]=> + int(21) + [u"protected_var1":protected]=> + unicode(8) "string_1" + [u"protected_var2":protected]=> + unicode(8) "string_2" + [u"public_var2"]=> + int(11) + } + [u"class_object4":protected]=> + object(object_class)#3 (7) { + [u"value"]=> + int(50) + [u"public_var1"]=> + int(10) + [u"private_var1":u"object_class":private]=> + int(20) + [u"private_var2":u"object_class":private]=> + int(21) + [u"protected_var1":protected]=> + unicode(8) "string_1" + [u"protected_var2":protected]=> + unicode(8) "string_2" + [u"public_var2"]=> + int(11) + } + [u"no_member_class_object"]=> + object(no_member_class)#4 (0) { + } + [u"class_object5"]=> + object(contains_object_class)#1 (7) { + [u"p"]=> + int(30) + [u"class_object1"]=> + object(object_class)#2 (7) { + [u"value"]=> + int(50) + [u"public_var1"]=> + int(10) + [u"private_var1":u"object_class":private]=> + int(20) + [u"private_var2":u"object_class":private]=> + int(21) + [u"protected_var1":protected]=> + unicode(8) "string_1" + [u"protected_var2":protected]=> + unicode(8) "string_2" + [u"public_var2"]=> + int(11) + } + [u"class_object2"]=> + object(object_class)#3 (7) { + [u"value"]=> + int(50) + [u"public_var1"]=> + int(10) + [u"private_var1":u"object_class":private]=> + int(20) + [u"private_var2":u"object_class":private]=> + int(21) + [u"protected_var1":protected]=> + unicode(8) "string_1" + [u"protected_var2":protected]=> + unicode(8) "string_2" + [u"public_var2"]=> + int(11) + } + [u"class_object3":u"contains_object_class":private]=> + object(object_class)#2 (7) { + [u"value"]=> + int(50) + [u"public_var1"]=> + int(10) + [u"private_var1":u"object_class":private]=> + int(20) + [u"private_var2":u"object_class":private]=> + int(21) + [u"protected_var1":protected]=> + unicode(8) "string_1" + [u"protected_var2":protected]=> + unicode(8) "string_2" + [u"public_var2"]=> + int(11) + } + [u"class_object4":protected]=> + object(object_class)#3 (7) { + [u"value"]=> + int(50) + [u"public_var1"]=> + int(10) + [u"private_var1":u"object_class":private]=> + int(20) + [u"private_var2":u"object_class":private]=> + int(21) + [u"protected_var1":protected]=> + unicode(8) "string_1" + [u"protected_var2":protected]=> + unicode(8) "string_2" + [u"public_var2"]=> + int(11) + } + [u"no_member_class_object"]=> + object(no_member_class)#4 (0) { + } + [u"class_object5"]=> + *RECURSION* + } + } + [4]=> + object(object_class)#2 (7) { + [u"value"]=> + int(50) + [u"public_var1"]=> + int(10) + [u"private_var1":u"object_class":private]=> + int(20) + [u"private_var2":u"object_class":private]=> + int(21) + [u"protected_var1":protected]=> + unicode(8) "string_1" + [u"protected_var2":protected]=> + unicode(8) "string_2" + [u"public_var2"]=> + int(11) + } + [5]=> + object(object_class)#3 (7) { + [u"value"]=> + int(50) + [u"public_var1"]=> + int(10) + [u"private_var1":u"object_class":private]=> + int(20) + [u"private_var2":u"object_class":private]=> + int(21) + [u"protected_var1":protected]=> + unicode(8) "string_1" + [u"protected_var2":protected]=> + unicode(8) "string_2" + [u"public_var2"]=> + int(11) + } + [6]=> + object(no_member_class)#4 (0) { + } + [7]=> + object(object_class)#5 (7) { + [u"value"]=> + int(50) + [u"public_var1"]=> + int(10) + [u"private_var1":u"object_class":private]=> + int(20) + [u"private_var2":u"object_class":private]=> + int(21) + [u"protected_var1":protected]=> + unicode(8) "string_1" + [u"protected_var2":protected]=> + unicode(8) "string_2" + [u"public_var2"]=> + int(11) + } + [8]=> + NULL +} +array(4) { + [0]=> + NULL + [1]=> + NULL + [2]=> + NULL + [3]=> + NULL +} +array(6) { + [0]=> + array(3) { + [0]=> + int(123) + [1]=> + float(-1.2345) + [2]=> + unicode(1) "a" + } + [1]=> + array(4) { + [0]=> + unicode(1) "d" + [1]=> + array(3) { + [0]=> + int(1) + [1]=> + int(3) + [2]=> + int(5) + } + [2]=> + bool(true) + [3]=> + NULL + } + [2]=> + array(4) { + [0]=> + object(no_member_class)#14 (0) { + } + [1]=> + array(0) { + } + [2]=> + bool(false) + [3]=> + int(0) + } + [3]=> + array(6) { + [0]=> + float(0) + [1]=> + unicode(11) "Where am I?" + [2]=> + array(3) { + [0]=> + int(7) + [1]=> + int(8) + [2]=> + int(9) + } + [3]=> + bool(true) + [4]=> + unicode(1) "A" + [5]=> + int(987654321) + } + [4]=> + array(4) { + [0]=> + NULL + [1]=> + float(20000000000) + [2]=> + float(79.1) + [3]=> + float(4.599998) + } + [5]=> + array(4) { + [0]=> + unicode(27) "array(1,2,3,4)1.0000002TRUE" + [1]=> + NULL + [2]=> + float(4611333) + [3]=> + unicode(5) "/00\7" + } +} + +*** Testing var_dump() on anonymous functions *** +New anonymous function: lambda_1 +unicode(9) "2 * 3 = 6" +unicode(9) "lambda_2" + +*** Testing error conditions *** + +Warning: Wrong parameter count for var_dump() in %s on line %d +Done -- 2.40.0