3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "<table cellpadding = 10>"; echo '<tr>'; echo '<th>3D table</th>'; $c = 0; if ($c >= $cols) { echo '</tr>'; $c = 0; } $start = '2014-04-01'; $end = '2014-04-31'; //for ($x=0;$x<count($values);$x++) { $sql = "SELECT empName, date, timeIn FROM attendance WHERE date >= '$start' AND date <= '$end' GROUP BY empName ORDER BY empName ASC"; $searchQuery = mysql_query("SELECT date FROM attendance GROUP BY DAY(date) ORDER BY date DESC LIMIT 20") or die($searchQuery."<br/><br/>".mysql_error()); $nums = mysql_num_rows($searchQuery); $rQuery = mysql_query($sql) or die($rQuery . "<br/><br/>" . mysql_error()); $num = mysql_num_rows($rQuery); for($y = 0; $y < $num; $y++) { $row = mysql_fetch_array($rQuery); echo '<tr>'; echo '<td class="odd">'. $row['empName'] .'</td>'; for($i = 0; $i < $nums; $i++) { $rows = mysql_fetch_array($searchQuery); echo '<td class="even">'.$rows['date'].'</td>'; }echo $y; echo '</tr>'; }
Output for git.master, git.master_jit, rfc.property-hooks
<table cellpadding = 10><tr><th>3D table</th> Warning: Undefined variable $cols in /in/9XYfY on line 7 </tr> Fatal error: Uncaught Error: Call to undefined function mysql_query() in /in/9XYfY:16 Stack trace: #0 {main} thrown in /in/9XYfY on line 16
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
34.91 ms | 401 KiB | 8 Q