1--TEST-- 2var_export(): simple test with arrays and objects 3--FILE-- 4<?php 5echo "\n\n-- Var export on a simple object --\n"; 6$o1 = new stdclass; 7$o1->p = '22'; 8$o2 = new stdclass; 9$o2->a = 1; 10$o2->b = array('k'=>2); 11$o2->x = $o1; 12var_export($o2); 13 14echo "\n\n-- Var export on an simple array --\n"; 15$a = array(1,2,3,4); 16var_export($a); 17 18echo "\n\n-- Var export on an nested array --\n"; 19$a = array('one' => 'first'); 20$b = array('foo' => $a, 'bar' => $o2); 21var_export($b); 22 23?> 24===DONE=== 25--EXPECT-- 26-- Var export on a simple object -- 27(object) array( 28 'a' => 1, 29 'b' => 30 array ( 31 'k' => 2, 32 ), 33 'x' => 34 (object) array( 35 'p' => '22', 36 ), 37) 38 39-- Var export on an simple array -- 40array ( 41 0 => 1, 42 1 => 2, 43 2 => 3, 44 3 => 4, 45) 46 47-- Var export on an nested array -- 48array ( 49 'foo' => 50 array ( 51 'one' => 'first', 52 ), 53 'bar' => 54 (object) array( 55 'a' => 1, 56 'b' => 57 array ( 58 'k' => 2, 59 ), 60 'x' => 61 (object) array( 62 'p' => '22', 63 ), 64 ), 65)===DONE=== 66