3v4l.org

run code in 300+ PHP versions simultaneously
<?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.3.11, 4.4.0 - 4.4.9, 5.0.2 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.8 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.25, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
<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>

preferences:
278.64 ms | 410 KiB | 329 Q