3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $url = ''; $configuration = array( 'applicationID' => 1, 'serverid' => 1, 'ul' => '', 'password' => '', 'adminuser' => '', 'hidelogin' => 1, 'AppMode' => '', 'username' => '' ); if (isset($_SERVER['SYMFONY__ENVIRONMENT']) && ($_SERVER['SYMFONY__ENVIRONMENT'] == 'prod')) { $overrides = array('password' => '', 'adminuser' => ''); $configuration = array_merge($configuration, $overrides); } renderView($url, $configuration); function renderView($url, $configuration) { $view = '<html> <head> <title>k</title> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <link href="wh.css" rel="stylesheet"/> </head> <body> <header> <h1 id="title"> <span class="icon"><img src="" alt=""/></span> </h1> </header> <div id="sub-header"> <h1> <span class="text"></span> </h1> </div> <div id="login-form">'; $view .= sprintf('<form action="%s" method="get" id="playerCheck">%s', $url, PHP_EOL); foreach ($configuration as $name => $value) { $view .= sprintf('<input type="hidden" name="%s" id="%s" value="%s"/>%s', $name, $name, $value, PHP_EOL); } $view .= '<input type="text" id="incompleteUsername" placeholder="Username" /> <input type="button" value="Check Player" id="sendForm" class="who-blue"/> </form> </div> </body> <script src="jquery-1.10.1.min.js"></script> <script type="text/javascript"> $(document).ready(function () { $(\'#sendForm\').click(function () { $(\'#username\').val( "aa_" + $(\'#incompleteUsername\').val() ); $(\'#playerCheck\').submit(); }); }); </script> </html>'; echo $view; }
Output for 4.3.10 - 4.4.9, 5.0.2 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
<html> <head> <title>k</title> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <link href="wh.css" rel="stylesheet"/> </head> <body> <header> <h1 id="title"> <span class="icon"><img src="" alt=""/></span> </h1> </header> <div id="sub-header"> <h1> <span class="text"></span> </h1> </div> <div id="login-form"><form action="" method="get" id="playerCheck"> <input type="hidden" name="applicationID" id="applicationID" value="1"/> <input type="hidden" name="serverid" id="serverid" value="1"/> <input type="hidden" name="ul" id="ul" value=""/> <input type="hidden" name="password" id="password" value=""/> <input type="hidden" name="adminuser" id="adminuser" value=""/> <input type="hidden" name="hidelogin" id="hidelogin" value="1"/> <input type="hidden" name="AppMode" id="AppMode" value=""/> <input type="hidden" name="username" id="username" value=""/> <input type="text" id="incompleteUsername" placeholder="Username" /> <input type="button" value="Check Player" id="sendForm" class="who-blue"/> </form> </div> </body> <script src="jquery-1.10.1.min.js"></script> <script type="text/javascript"> $(document).ready(function () { $('#sendForm').click(function () { $('#username').val( "aa_" + $('#incompleteUsername').val() ); $('#playerCheck').submit(); }); }); </script> </html>
Output for 4.3.0 - 4.3.9, 5.0.0 - 5.0.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/9pc18 on line 47 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/9pc18 on line 50 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/9pc18 on line 50 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/9pc18 on line 50 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/9pc18 on line 50 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/9pc18 on line 50 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/9pc18 on line 50 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/9pc18 on line 50 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/9pc18 on line 50 <html> <head> <title>k</title> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <link href="wh.css" rel="stylesheet"/> </head> <body> <header> <h1 id="title"> <span class="icon"><img src="" alt=""/></span> </h1> </header> <div id="sub-header"> <h1> <span class="text"></span> </h1> </div> <div id="login-form"><form action="" method="get" id="playerCheck">PHP_EOL<input type="hidden" name="applicationID" id="applicationID" value="1"/>PHP_EOL<input type="hidden" name="serverid" id="serverid" value="1"/>PHP_EOL<input type="hidden" name="ul" id="ul" value=""/>PHP_EOL<input type="hidden" name="password" id="password" value=""/>PHP_EOL<input type="hidden" name="adminuser" id="adminuser" value=""/>PHP_EOL<input type="hidden" name="hidelogin" id="hidelogin" value="1"/>PHP_EOL<input type="hidden" name="AppMode" id="AppMode" value=""/>PHP_EOL<input type="hidden" name="username" id="username" value=""/>PHP_EOL<input type="text" id="incompleteUsername" placeholder="Username" /> <input type="button" value="Check Player" id="sendForm" class="who-blue"/> </form> </div> </body> <script src="jquery-1.10.1.min.js"></script> <script type="text/javascript"> $(document).ready(function () { $('#sendForm').click(function () { $('#username').val( "aa_" + $('#incompleteUsername').val() ); $('#playerCheck').submit(); }); }); </script> </html>