3v4l.org

run code in 300+ PHP versions simultaneously
<?php <?php require_once "../other/sql.php"; function workers($job, $contentVar, $conn){ $sql_job = "SELECT * FROM `jobs` WHERE `id`=$job"; $q_job = $conn->query($sql_job); $q_job->setFetchMode(PDO::FETCH_ASSOC); $result_job = $q_job->fetch(); print_r($result_job); // if (mysql_num_rows($result_job) > 0){ $jobTitle=$result_job['title']; $population=100; $header = "How many $jobTitle would you like to add?"; $body=" <form method='post' action='post'> <input type='range' autofocus name='workers' id='workers' min='0' max='$population' value='0' onmousemove='more()' onkeydown='more()' step='1'> <input type='hidden' name='job' id='job' value='".$job."'> <input type='button' value='Submit' id='submit'> </form> "; return $header; return $body; echo $header; // } } echo "<script> function more() { var x = document.getElementById('workers').value; document.getElementById('people').innerHTML = x; } </script> ";
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.36
Parse error: syntax error, unexpected '<' in /in/9rRV3 on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '<' in /in/9rRV3 on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/9rRV3 on line 3
Process exited with code 255.

preferences:
159.46 ms | 1000 KiB | 7 Q