3v4l.org

run code in 300+ PHP versions simultaneously
<?php $titlex = 'this is a string with a \' in it'; $desc = 'this also is a string with a \' in it'; ?> <script> const updatepopup = (title, desc) => alert(title + '\n' + desc); </script> <h1>Test page</h1> <a href="" onclick="<?= htmlentities('updatepopup('.json_encode($titlex).', ' .json_encode($desc) .');', ENT_QUOTES); ?>">Click me</a>
Output for git.master, git.master_jit, rfc.property-hooks
<script> const updatepopup = (title, desc) => alert(title + '\n' + desc); </script> <h1>Test page</h1> <a href="" onclick="updatepopup(&quot;this is a string with a &#039; in it&quot;, &quot;this also is a string with a &#039; in it&quot;);">Click me</a>

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:
39.14 ms | 402 KiB | 8 Q