3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_POST['contentDetails'] = '<p>This is data sample.&nbsp;</p><p>Second part of the paragraph.&nbsp;</p>'; $xml = '<?xml version="1.0" encoding="UTF-8">'; $xml .= '<root>'; $xml .= '<myData>'; $xml .= '<content>' . htmlentities(str_replace("&nbsp;", "", $_POST['contentDetails'])) . '</content>'; $xml .= '</myData>'; $xml .= '</root>'; echo $xml;
Output for git.master, git.master_jit, rfc.property-hooks
<?xml version="1.0" encoding="UTF-8"><root><myData><content>&lt;p&gt;This is data sample.&lt;/p&gt;&lt;p&gt;Second part of the paragraph.&lt;/p&gt;</content></myData></root>

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:
341.53 ms | 405 KiB | 5 Q