blob: e4c3c59d37e48b9660dba8d1600975a5fd6d2952 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
--TEST--
Bug #62328 (implementing __toString and a cast to string fails)
--SKIPIF--
<?php
require_once("skipif.inc");
?>
--FILE--
<?php
class UberSimpleXML extends SimpleXMLElement {
public function __toString() {
return 'stringification';
}
}
$xml = new UberSimpleXML('<xml/>');
var_dump((string) $xml);
var_dump($xml->__toString());
--EXPECT--
string(15) "stringification"
string(15) "stringification"
|