3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xmldata = <<< XML <?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>XML Example</title> </head> <body> <p> <b>Hello, World!</b> </p> </body> </html> XML; $sxe = simplexml_load_string($xmldata); $p = $sxe->body->p; var_dump($p); $string = trim(strip_tags(($p->asXML()))); print $string; ?>
Output for git.master, git.master_jit, rfc.property-hooks
object(SimpleXMLElement)#4 (1) { ["b"]=> string(13) "Hello, World!" } Hello, World!

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
52.42 ms | 401 KiB | 8 Q