colder          Thu May  8 12:02:17 2008 UTC

  Added files:                 (Branch: PHP_5_3)
    /php-src/ext/spl/tests      array_023.phpt 
  Log:
  Sync spl tests with HEAD
  

http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/array_023.phpt?view=markup&rev=1.1
Index: php-src/ext/spl/tests/array_023.phpt
+++ php-src/ext/spl/tests/array_023.phpt
--TEST--
Testing class extending to ArrayObject and serialize
--FILE--
<?php

class Name extends ArrayObject
{
    public $var = 'a';
    protected $bar = 'b';
    private $foo = 'c';
}

$a = new Name();
var_dump($a);
var_dump($a->var);

$a = unserialize(serialize($a));

var_dump($a);
var_dump($a->var);

?>
--EXPECT--
object(Name)#1 (4) {
  ["var"]=>
  string(1) "a"
  ["bar":protected]=>
  string(1) "b"
  ["foo":"Name":private]=>
  string(1) "c"
  ["storage":"ArrayObject":private]=>
  array(0) {
  }
}
string(1) "a"
object(Name)#2 (4) {
  ["var"]=>
  string(1) "a"
  ["bar":protected]=>
  string(1) "b"
  ["foo":"Name":private]=>
  string(1) "c"
  ["storage":"ArrayObject":private]=>
  array(0) {
  }
}
string(1) "a"



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to