3v4l.org

run code in 300+ PHP versions simultaneously
<? //데이터 베이스 연결하기 include "db_info.php"; //Thread 값을 계산한다. $query = "SELECT max(thread) FROM $threadboard"; $max_thread_result = mysql_query($query, $conn); $max_thread_fetch = mysql_fetch_row($max_thread_result); $max_thread = ceil($max_thread_fetch[0]/1000)*1000+1000; $query = "INSERT INTO $threadboard (thread, depth, name, pass, email, title, view, wdate, ip, content) VALUES ($max_thread, 0, '$_POST[name]', '$_POST[pass]', '$_POST[email]', '$_POST[title]', 0, UNIX_TIMESTAMP(), '$_SERVER[REMOTE_ADDR]', '$_POST[content]')"; $result=mysql_query($query, $conn); //데이터베이스와의 연결 종료 mysql_close($conn); // 새 글 쓰기인 경우 리스트로.. //echo ("<meta http-equiv='Refresh' content='1; URL=list.php'>"); echo $query ?> <center> <font size=2>정상적으로 저장되었습니다.</font>
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 7.2.29 - 7.2.33, 7.3.16 - 7.3.31, 7.4.0 - 7.4.32, 8.0.0 - 8.0.12, 8.0.14 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
<? //데이터 베이스 연결하기 include "db_info.php"; //Thread 값을 계산한다. $query = "SELECT max(thread) FROM $threadboard"; $max_thread_result = mysql_query($query, $conn); $max_thread_fetch = mysql_fetch_row($max_thread_result); $max_thread = ceil($max_thread_fetch[0]/1000)*1000+1000; $query = "INSERT INTO $threadboard (thread, depth, name, pass, email, title, view, wdate, ip, content) VALUES ($max_thread, 0, '$_POST[name]', '$_POST[pass]', '$_POST[email]', '$_POST[title]', 0, UNIX_TIMESTAMP(), '$_SERVER[REMOTE_ADDR]', '$_POST[content]')"; $result=mysql_query($query, $conn); //데이터베이스와의 연결 종료 mysql_close($conn); // 새 글 쓰기인 경우 리스트로.. //echo ("<meta http-equiv='Refresh' content='1; URL=list.php'>"); echo $query ?> <center> <font size=2>정상적으로 저장되었습니다.</font>
Output for 8.0.13
Warning: include(db_info.php): Failed to open stream: No such file or directory in /in/aEa5f on line 3 Warning: include(): Failed opening 'db_info.php' for inclusion (include_path='.:') in /in/aEa5f on line 3 Warning: Undefined variable $threadboard in /in/aEa5f on line 6 Fatal error: Uncaught Error: Call to undefined function mysql_query() in /in/aEa5f:7 Stack trace: #0 {main} thrown in /in/aEa5f on line 7
Process exited with code 255.
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.10, 7.2.0, 7.4.33
Warning: include(db_info.php): failed to open stream: No such file or directory in /in/aEa5f on line 3 Warning: include(): Failed opening 'db_info.php' for inclusion (include_path='.:') in /in/aEa5f on line 3 Notice: Undefined variable: threadboard in /in/aEa5f on line 6 Fatal error: Uncaught Error: Call to undefined function mysql_query() in /in/aEa5f:7 Stack trace: #0 {main} thrown in /in/aEa5f on line 7
Process exited with code 255.
Output for 7.3.32 - 7.3.33
Warning: include(db_info.php): failed to open stream: No such file or directory in /in/aEa5f on line 3 Warning: include(): Failed opening 'db_info.php' for inclusion (include_path='.:') in /in/aEa5f on line 3 Fatal error: Uncaught Error: Call to undefined function mysql_query() in /in/aEa5f:7 Stack trace: #0 {main} thrown in /in/aEa5f on line 7
Process exited with code 255.
Output for 7.1.20, 7.2.6
Warning: include(): open_basedir restriction in effect. File(db_info.php) is not within the allowed path(s): (/tmp:/in) in /in/aEa5f on line 3 Warning: include(db_info.php): failed to open stream: Operation not permitted in /in/aEa5f on line 3 Warning: include(): Failed opening 'db_info.php' for inclusion (include_path='.:') in /in/aEa5f on line 3 Notice: Undefined variable: threadboard in /in/aEa5f on line 6 Fatal error: Uncaught Error: Call to undefined function mysql_query() in /in/aEa5f:7 Stack trace: #0 {main} thrown in /in/aEa5f on line 7
Process exited with code 255.
Output for 5.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.7 - 5.6.28
Warning: include(db_info.php): failed to open stream: No such file or directory in /in/aEa5f on line 3 Warning: include(): Failed opening 'db_info.php' for inclusion (include_path='.:') in /in/aEa5f on line 3 Notice: Undefined variable: threadboard in /in/aEa5f on line 6 Fatal error: Call to undefined function mysql_query() in /in/aEa5f on line 7
Process exited with code 255.

preferences:
241.28 ms | 402 KiB | 313 Q