3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo"<script language='javascript'> (function ($) /* Wraps this `$ = jQuery` routine. */ { $.fn.swapWith = function (to) /* Utility extension for jQuery. */ { return this.each(function () { var $to = $(to).clone(true), $from = $(this).clone(true); $(to).replaceWith($from), $(this).replaceWith($to); }); }; /**/ $(document).ready(function () /* Handles email-to-username on keyup. */ { var email = 'input#user_email', login = 'input#user_login'; $(email).closest('p').swapWith($(login).closest('p')), $(email).keyup(function () { $(login).val($.trim($(email).val().split(/@/)[0].replace(/[^\w]/gi, ''))); }); }); })(jQuery); </script> "; ?>
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined variable $to in /in/SnlaB on line 8 Warning: Undefined variable $from in /in/SnlaB on line 9 Warning: Undefined variable $from in /in/SnlaB on line 10 Warning: Undefined variable $to in /in/SnlaB on line 10 <script language='javascript'> (function ($) /* Wraps this `$ = jQuery` routine. */ { $.fn.swapWith = function (to) /* Utility extension for jQuery. */ { return this.each(function () { var = $(to).clone(true), = $(this).clone(true); $(to).replaceWith(), $(this).replaceWith(); }); }; /**/ $(document).ready(function () /* Handles email-to-username on keyup. */ { var email = 'input#user_email', login = 'input#user_login'; $(email).closest('p').swapWith($(login).closest('p')), $(email).keyup(function () { $(login).val($.trim($(email).val().split(/@/)[0].replace(/[^\w]/gi, ''))); }); }); })(jQuery); </script>

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:
33.43 ms | 403 KiB | 8 Q