diff options
Diffstat (limited to 'ext/spl/tests/bug62328.phpt')
| -rw-r--r-- | ext/spl/tests/bug62328.phpt | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/ext/spl/tests/bug62328.phpt b/ext/spl/tests/bug62328.phpt new file mode 100644 index 0000000..33a8aee --- /dev/null +++ b/ext/spl/tests/bug62328.phpt @@ -0,0 +1,24 @@ +--TEST-- +Bug #62328 (cast_object takes precedence over __toString) +--CREDITS-- +leight at gmail dot com +--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 |
