3v4l.org

run code in 300+ PHP versions simultaneously
<html> <head><title>Glycine max gene</title> </head> <body> <center> <p align="center">&nbsp;</p> <p align="center"><b><span style="font-size:18pt;">Glycine max gene</span></b></p> <hr></p></p> <? date_default_timezone_set('UTC'); $limit = 40; // 한 화면에 보여지는 재학생 행(레코드)수 if(!$now) { $now = 1; // 현재 페이지 번호 초기화 } $connect = mysql_connect("localhost", "root", "rhkddj12"); mysql_select_db("ust", $connect); if($Locus_name == null) { $sql = "select * from gmax_info order by Locus_name"; } else { $sql = "select * from gmax_info where Locus_name like '%$Locus_name%'"; } $result = mysql_query($sql, $connect); $total = mysql_num_rows($result); // 전체 재학생 행(레코드) 수 $total_page = (int)($total/$limit); if($total%$limit) { // 나머지가 있으면 $total_page++; // 전체 페이지 수 1 증가 } $start = ($now-1)*$limit; if($Locus_name == null) { $sql1 = "select * from gmax_info order by Locus_name limit $start, $limit"; } else { $sql1 = "select * from gmax_info where Locus_name like '%$Locus_name%' limit $start, $limit"; } $result1 = mysql_query($sql1, $connect); echo "<table border=1 bordercolor='#0033FF' align=center>"; echo "<tr><th>Locus_name<th>Transcript_name<th>Gene_name<th>Description"; while($row = mysql_fetch_array($result1)) { echo "<tr>"; echo "<td> $row[Locus_name] </td>"; echo "<td> $row[Transcript_name] </td>"; echo "<td> $row[Gene_name] </td>"; echo "<td> $row[Description] </td>"; echo "</tr>"; } echo "</table>"; for($i=1; $i<=$total_page; $i++) { if($i == $now) { echo("[$i]"); // 현재 페이지는 링크 안함 } else { echo (" <a href = hapmap_search_gene.php?now=$i&Locus_name=$Locus_name>[$i] </a>"); } } ?> </center> </body> </html>
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, 5.4.28 - 5.4.32, 7.2.29 - 7.2.33, 7.3.12 - 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.19, 8.3.0 - 8.3.7
<html> <head><title>Glycine max gene</title> </head> <body> <center> <p align="center">&nbsp;</p> <p align="center"><b><span style="font-size:18pt;">Glycine max gene</span></b></p> <hr></p></p> <? date_default_timezone_set('UTC'); $limit = 40; // 한 화면에 보여지는 재학생 행(레코드)수 if(!$now) { $now = 1; // 현재 페이지 번호 초기화 } $connect = mysql_connect("localhost", "root", "rhkddj12"); mysql_select_db("ust", $connect); if($Locus_name == null) { $sql = "select * from gmax_info order by Locus_name"; } else { $sql = "select * from gmax_info where Locus_name like '%$Locus_name%'"; } $result = mysql_query($sql, $connect); $total = mysql_num_rows($result); // 전체 재학생 행(레코드) 수 $total_page = (int)($total/$limit); if($total%$limit) { // 나머지가 있으면 $total_page++; // 전체 페이지 수 1 증가 } $start = ($now-1)*$limit; if($Locus_name == null) { $sql1 = "select * from gmax_info order by Locus_name limit $start, $limit"; } else { $sql1 = "select * from gmax_info where Locus_name like '%$Locus_name%' limit $start, $limit"; } $result1 = mysql_query($sql1, $connect); echo "<table border=1 bordercolor='#0033FF' align=center>"; echo "<tr><th>Locus_name<th>Transcript_name<th>Gene_name<th>Description"; while($row = mysql_fetch_array($result1)) { echo "<tr>"; echo "<td> $row[Locus_name] </td>"; echo "<td> $row[Transcript_name] </td>"; echo "<td> $row[Gene_name] </td>"; echo "<td> $row[Description] </td>"; echo "</tr>"; } echo "</table>"; for($i=1; $i<=$total_page; $i++) { if($i == $now) { echo("[$i]"); // 현재 페이지는 링크 안함 } else { echo (" <a href = hapmap_search_gene.php?now=$i&Locus_name=$Locus_name>[$i] </a>"); } } ?> </center> </body> </html>
Output for 8.0.13
<html> <head><title>Glycine max gene</title> </head> <body> <center> <p align="center">&nbsp;</p> <p align="center"><b><span style="font-size:18pt;">Glycine max gene</span></b></p> <hr></p></p> Warning: Undefined variable $now in /in/TrmAc on line 12 Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /in/TrmAc:16 Stack trace: #0 {main} thrown in /in/TrmAc on line 16
Process exited with code 255.
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.25, 7.2.0 - 7.2.13, 7.3.0 - 7.3.1, 7.4.33
<html> <head><title>Glycine max gene</title> </head> <body> <center> <p align="center">&nbsp;</p> <p align="center"><b><span style="font-size:18pt;">Glycine max gene</span></b></p> <hr></p></p> Notice: Undefined variable: now in /in/TrmAc on line 12 Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /in/TrmAc:16 Stack trace: #0 {main} thrown in /in/TrmAc on line 16
Process exited with code 255.
Output for 7.3.32 - 7.3.33
<html> <head><title>Glycine max gene</title> </head> <body> <center> <p align="center">&nbsp;</p> <p align="center"><b><span style="font-size:18pt;">Glycine max gene</span></b></p> <hr></p></p> Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /in/TrmAc:16 Stack trace: #0 {main} thrown in /in/TrmAc on line 16
Process exited with code 255.
Output for 5.4.0 - 5.4.27, 5.4.34 - 5.4.45, 5.5.24 - 5.5.35, 5.6.8 - 5.6.28
<html> <head><title>Glycine max gene</title> </head> <body> <center> <p align="center">&nbsp;</p> <p align="center"><b><span style="font-size:18pt;">Glycine max gene</span></b></p> <hr></p></p> Notice: Undefined variable: now in /in/TrmAc on line 12 Fatal error: Call to undefined function mysql_connect() in /in/TrmAc on line 16
Process exited with code 255.

preferences:
235.09 ms | 403 KiB | 331 Q