summaryrefslogtreecommitdiff
path: root/ext/spl/tests/bug64023.phpt
blob: cb984452798eaf45679b9541c02af836160f0e54 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--TEST--
Bug #64023: Overloading __toString() in SplFileInfo has no effect
--FILE--
<?php
class A extends \SplFileInfo
{
	    public function __toString() {return ' -expected- ';}
}

$a = new A('/');

// Works
echo $a, $a->__toString(), $a->__toString() . '', "\n";

// Does not work - outputs parent::__toString()
echo $a . '', "\n";
--EXPECT--
 -expected-  -expected-  -expected- 
 -expected-