3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (isset($_GET["cname"])) { include_once("conx.php"); if (strlen($_GET['cname']) < 4 || strlen($_GET['cname']) > 17) { echo "1"; exit(); } else { if (preg_match("/[^a-z0-9]/", "$_GET['cname']")) { echo "2"; exit(); } else { $u = mysqli_real_escape_string($db_conx, $_GET['cname']); } } } ?>
Output for 5.4.0 - 5.4.27
Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in /in/In2jS on line 6
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /in/In2jS on line 6
Process exited with code 255.

preferences:
181.28 ms | 1395 KiB | 64 Q