Edit report at https://bugs.php.net/bug.php?id=60452&edit=1
ID: 60452 Updated by: larue...@php.net Reported by: kashpur dot kostya at gmail dot com Summary: redefine __toString -Status: Open +Status: Feedback Type: Bug Package: *General Issues Operating System: Windows7 PHP Version: 5.3.8 Block user comment: N Private report: N New Comment: Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. I can not reproduce what you described with following assuming script: <?php class A extends \SplFileInfo { public function __toString() { return 'it`s A'; } } $l = new A(PHP_SELF); echo $l; Previous Comments: ------------------------------------------------------------------------ [2011-12-06 21:28:35] kashpur dot kostya at gmail dot com Description: ------------ I can`t redefine __toString Test script: --------------- class A extends \SplFileInfo { ... public function __toString() { return 'it`s A'; } ... } Expected result: ---------------- it`s A Actual result: -------------- path/to/the/file.php ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=60452&edit=1