Commit: 222ab9da1aa086a47279d29c16a8ebea514257fe Author: Leigh <lei...@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 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php