mirror of
https://github.com/php/php-src.git
synced 2024-10-03 07:46:12 +00:00
25 lines
387 B
PHP
25 lines
387 B
PHP
--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
|