3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function newPlayer($wallet) { generate_: { $hash=generateHash(32); } if (mysql_num_rows(mysql_query("SELECT `id` FROM `players` WHERE `hash`='$hash' LIMIT 1"))!=0) goto generate_; $alias='Player_'; $alias_i=mysql_fetch_array(mysql_query("SELECT `autoalias_increment` AS `data` FROM `system` LIMIT 1")); $alias_i=$alias_i['data']; mysql_query("UPDATE `system` SET `autoalias_increment`=`autoalias_increment`+1 LIMIT 1"); mysql_query("INSERT INTO `players` (`hash`,`alias`,`time_last_active`,`server_seed`) VALUES ('$hash','".$alias.$alias_i."',NOW(),'".generateServerSeed()."')"); header('Location: ./?unique='.$hash.'# Do Not Share This URL!'); exit(); } newPlayer('sdsd');
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Error: Call to undefined function generateHash() in /in/d7pde:5 Stack trace: #0 /in/d7pde(16): newPlayer('sdsd') #1 {main} thrown in /in/d7pde on line 5
Process exited with code 255.
Output for 5.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0
Fatal error: Call to undefined function generateHash() in /in/d7pde on line 5
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected ':' in /in/d7pde on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected ':' in /in/d7pde on line 4
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/d7pde on line 4
Process exited with code 255.