3v4l.org

run code in 300+ PHP versions simultaneously
<?php // suppose some data is missing... function generateXML(){ $data = []; $data["height"]; $data["text"]="just a test"; // if generating the XML: $xml = "<template>"; $xml .= empty($data["height"])? "" : "<height>$data[height]</height><width>$data[height]</width>"; $xml .= empty($data["text"])? "" : "<text>$data[text]</text>"; $xml .= "</template>"; return $xml; } echo generateXML(); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined array key "height" in /in/3pjKd on line 5 <template><text>just a test</text></template>

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:
36.39 ms | 405 KiB | 9 Q