3v4l.org

run code in 300+ PHP versions simultaneously
<?php define ("db_user", "*"); define ("db_pswd", "*"); define ("db_host", "*"); define ("db_name", "*"); $dbconnect = mysql_connect(db_host, db_user, db_pswd, db_name); if (!$dbconnect) { die ("Error: connection to databese failed."); } echo "You have successfully connected to the databese"; ?>
Output for 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.25, 8.4.1 - 8.4.12
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /in/2T60a:8 Stack trace: #0 {main} thrown in /in/2T60a on line 8
Process exited with code 255.

preferences:
132.97 ms | 408 KiB | 5 Q