cvs: ZendEngine2 /tests bug30791.phpt

From: Date: Thu, 06 Oct 2005 19:00:44 +0000
Subject: cvs: ZendEngine2 /tests bug30791.phpt
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-4207@lists.php.net to get a copy of this message
helly Thu Oct 6 15:00:44 2005 EDT Modified files: /ZendEngine2/tests bug30791.phpt Log: - Fix test http://cvs.php.net/diff.php/ZendEngine2/tests/bug30791.phpt?r1=1.2&r2=1.3&ty=u Index: ZendEngine2/tests/bug30791.phpt diff -u ZendEngine2/tests/bug30791.phpt:1.2 ZendEngine2/tests/bug30791.phpt:1.3 --- ZendEngine2/tests/bug30791.phpt:1.2 Wed Jun 1 07:03:58 2005 +++ ZendEngine2/tests/bug30791.phpt Thu Oct 6 15:00:42 2005 @@ -2,21 +2,33 @@ Bug #30791 magic methods (__sleep/__wakeup/__toString) call __call if object is overloaded --FILE-- <?php -class a { + +function my_error_handler($errno, $errstr, $errfile, $errline) { + var_dump($errstr); +} + +set_error_handler('my_error_handler'); + +class a +{ public $a = 4; function __call($a,$b) { return "unknown method"; } } + $b = new a; echo $b,"\n"; $c = unserialize(serialize($b)); echo $c,"\n"; var_dump($c); + ?> --EXPECT-- -Object id #1 -Object id #2 +string(50) "Object of class a could not be converted to string" + +string(50) "Object of class a could not be converted to string" + object(a)#2 (1) { ["a"]=> int(4)

« previous php.zend-engine.cvs (#4207) next »