mirror of
https://github.com/php/php-src.git
synced 2025-01-13 22:44:36 +08:00
Merge branch 'PHP-5.4'
This commit is contained in:
commit
e51acee43d
24
ext/spl/tests/bug62328.phpt
Normal file
24
ext/spl/tests/bug62328.phpt
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user