1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00
Files
Max Semenik 7f2f0c007c Migrate skip checks to --EXTENSIONS--, p4
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
2021-04-08 10:36:44 +02:00

63 lines
1.1 KiB
PHP

--TEST--
SimpleXML: Simple Inheritance
--EXTENSIONS--
simplexml
--FILE--
<?php
class simplexml_inherited extends SimpleXMLElement
{
}
$xml =<<<EOF
<?xml version='1.0'?>
<!DOCTYPE sxe SYSTEM "notfound.dtd">
<sxe id="elem1">
<elem1 attr1='first'>
<!-- comment -->
<elem2>
<elem3>
<elem4>
<?test processing instruction ?>
</elem4>
</elem3>
</elem2>
</elem1>
</sxe>
EOF;
var_dump(simplexml_load_string($xml, 'simplexml_inherited'));
?>
--EXPECTF--
object(simplexml_inherited)#%d (2) {
["@attributes"]=>
array(1) {
["id"]=>
string(5) "elem1"
}
["elem1"]=>
object(simplexml_inherited)#%d (3) {
["@attributes"]=>
array(1) {
["attr1"]=>
string(5) "first"
}
["comment"]=>
object(simplexml_inherited)#%d (0) {
}
["elem2"]=>
object(simplexml_inherited)#%d (1) {
["elem3"]=>
object(simplexml_inherited)#%d (1) {
["elem4"]=>
object(simplexml_inherited)#%d (1) {
["test"]=>
object(simplexml_inherited)#%d (0) {
}
}
}
}
}
}