mirror of
https://github.com/php/php-src.git
synced 2026-03-24 08:12:21 +01:00
For rationale, see #6787 Extensions migrated in part 4: * simplexml * skeleton * soap * spl * sqlite3 * sysvmsg * sysvsem * tidy - also removed a check for an ancient dependency version
21 lines
402 B
PHP
21 lines
402 B
PHP
--TEST--
|
|
Bug #62328 (implementing __toString and a cast to string fails)
|
|
--EXTENSIONS--
|
|
simplexml
|
|
--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"
|