mirror of
https://github.com/php/php-src.git
synced 2026-04-14 03:22:58 +02:00
person.xml
--
<person>
<name>
<first>Sterling</first>
<last>Hughes</last>
</name>
</person>
person.php
--
<?php
$p = simplexml_load_file('person.xml');
echo $p->name->last . ', ' . $p->name->first;
?>
Still needs lots of work.
25 lines
578 B
PHP
25 lines
578 B
PHP
--TEST--
|
|
Check for simplexml presence
|
|
--SKIPIF--
|
|
<?php if (!extension_loaded("simplexml")) print "skip"; ?>
|
|
--POST--
|
|
--GET--
|
|
--INI--
|
|
--FILE--
|
|
<?php
|
|
echo "simplexml extension is available";
|
|
/*
|
|
you can add regression tests for your extension here
|
|
|
|
the output of your test code has to be equal to the
|
|
text in the --EXPECT-- section below for the tests
|
|
to pass, differences between the output and the
|
|
expected text are interpreted as failure
|
|
|
|
see php4/README.TESTING for further information on
|
|
writing regression tests
|
|
*/
|
|
?>
|
|
--EXPECT--
|
|
simplexml extension is available
|