3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = new SimpleXMLElement('<properties> <property> <label><![CDATA[Art.Nr.]]></label> <value><![CDATA[0079581233]]></value> </property> <property> <label><![CDATA[Volumen]]></label> <value><![CDATA[16 Liter]]></value> </property> <property> <label><![CDATA[Material]]></label> <value><![CDATA[Polyamide]]></value> </property> <property> <label><![CDATA[Handgepäck]]></label> <value><![CDATA[ja]]></value> </property> <property> <label><![CDATA[Serie]]></label> <value><![CDATA[Basic Backpacks]]></value> </property> <property> <label><![CDATA[Gepäckart]]></label> <value><![CDATA[Weichgepäck]]></value> </property> <property> <label><![CDATA[Farbe]]></label> <value><![CDATA[Black]]></value> </property> <property> <label><![CDATA[Ma&szlig;e]]></label> <value><![CDATA[21 * 26 * 36 m]]></value> </property> </properties>'); var_dump($x->property->value); var_dump((string) $x->property->value); $v = new StdClass(); try { var_dump(strval($v)); } catch (Exception $e) { var_dump( $v); }
Output for git.master, git.master_jit, rfc.property-hooks
object(SimpleXMLElement)#4 (1) { [0]=> object(SimpleXMLElement)#3 (0) { } } string(10) "0079581233" Fatal error: Uncaught Error: Object of class stdClass could not be converted to string in /in/ukNiu:44 Stack trace: #0 {main} thrown in /in/ukNiu on line 44
Process exited with code 255.

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:
60.84 ms | 401 KiB | 8 Q