com php-src: Test for bug 62328: Zend/tests/bug62328.phpt

From: Date: Fri, 10 Aug 2012 10:43:53 +0000
Subject: com php-src: Test for bug 62328: Zend/tests/bug62328.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-69806@lists.php.net to get a copy of this message
Commit: 222ab9da1aa086a47279d29c16a8ebea514257fe Author: Leigh <leight@gmail.com> Fri, 10 Aug 2012 11:43:53 +0100 Parents: a5dfd414941953c282bb68f6b08685252ca93a1a Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=222ab9da1aa086a47279d29c16a8ebea514257fe Log: Test for bug 62328 Bugs: https://bugs.php.net/62328 Changed paths: A Zend/tests/bug62328.phpt Diff: diff --git a/Zend/tests/bug62328.phpt b/Zend/tests/bug62328.phpt new file mode 100644 index 0000000..c56ddc2 --- /dev/null +++ b/Zend/tests/bug62328.phpt @@ -0,0 +1,22 @@ +--TEST-- +Bug #62328 (cast_object takes precedence over __toString) +--FILE-- +<?php + +class SplFileInfo62328 extends SplFileInfo +{ + public function __toString() + { + return '__toString'; + } +} + +$fi = new SplFileInfo62328(__FILE__); + +echo (string)$fi . PHP_EOL; +echo (string)$fi->__toString() . PHP_EOL; + +?> +--EXPECT-- +__toString +__toString

« previous php.cvs (#69806) next »