3v4l.org

run code in 300+ PHP versions simultaneously
<!DOCTYPE html> <html> <head> <title>Калькулятор матрицы</title> <meta charset="utf-8"> <style> .layer1 { display: table-cell; vertical-align: middle; float: none; } .layer2 { position: relative; margin-left: 5%; display: table-cell; vertical-align: middle; float: none; width: 100px; text-align: center; } .layer3 { display: table-cell; vertical-align: middle; float: none; } </style> </head> <body> <!-- Check empty string --> <?php if (!isset($_POST['step'])): ?> <form method="post"> <p><b>Введите число, соответствующее размерности квадратной матрицы:</b></p> <input type="text" name="size" size="5" /> <input type="submit" value="OK" /> <input type="hidden" name="step" value="1" /> </form> <?php elseif ($_POST['step'] == 1): ?> <form method="post"> <p><b>Введите значения для вектора и матрицы:</b></p> <?php $size = $_POST['size']; if ($size < 5): echo "Введите " . ($size * $size) . " значения для матрицы"; else: echo "Введите " . ($size * $size) . " значений для матрицы"; endif; ?> <br /> <table> <?php for ($raw=0; $raw < $size; $raw++) { ?> <tr> <?php for ($column=0; $column < $size; $column++) { ?> <td><input type="text" name="numberMatrix[<?php print $raw ?>][<?php print $column ?>]" size="5" /></td> <?php } ?> </tr> <?php } ?> </table> <br /> <?php $size = $_POST['size']; if ($size < 5): echo "Введите " . $size . " значения для вектора"; else: echo "Введите " . $size . " значений для вектора"; endif; ?> <br /> <table> <?php for ($column=0; $column < $size; $column++): ?> <td><input type="text" name="numberVector[0][<?php print $column ?>]" size="5" /></td> <?php endfor ?> </table> <br /> <input type="submit" value="OK" /> <input type="hidden" name="step" value="2" /> <input type="hidden" name="size" value="<?php echo $size; ?>" /> </form> <?php elseif ($_POST['step'] == 2): ?> <form method="post"> <div class="layer1"> <?php $size = $_POST['size']; $matrix = array(); $matrixResult = array(); $graph = array(); ?> <table border> <?php for ($raw=0; $raw < $size; $raw++) { ?> <tr> <?php for ($column=0; $column < $size; $column++) { ?> <td style="text-align: center; width: 30px;"> <?php $matrix[$raw][$column] = $_POST['numberMatrix'][$raw][$column]; echo $matrix[$raw][$column]; ?> </td> <?php } ?> </tr> <?php } ?> </table> </div> <div class="layer2"> <?php echo "*" ?> </div> <div class="layer3"> <table border> <?php for ($column=0; $column < $size; $column++) { ?> <tr><td style="text-align: center; width: 30px;"> <?php $graph[$column] = $_POST['numberVector'][0][$column]; echo $graph[$column]; } ?> </td></tr> </table> </div> <div class="layer2"> <?php echo "=" ?> </div> <div class="layer3"> <table board> <?php foreach ($matrix as $result) { //foreach () { echo "$matrix: $result"; //} } ?> </table> </div> <input type="hidden" name="step" value="3" </form> <?php endif; ?> </body> </html>
Output for git.master, git.master_jit, rfc.property-hooks
<!DOCTYPE html> <html> <head> <title>Калькулятор матрицы</title> <meta charset="utf-8"> <style> .layer1 { display: table-cell; vertical-align: middle; float: none; } .layer2 { position: relative; margin-left: 5%; display: table-cell; vertical-align: middle; float: none; width: 100px; text-align: center; } .layer3 { display: table-cell; vertical-align: middle; float: none; } </style> </head> <body> <!-- Check empty string --> <form method="post"> <p><b>Введите число, соответствующее размерности квадратной матрицы:</b></p> <input type="text" name="size" size="5" /> <input type="submit" value="OK" /> <input type="hidden" name="step" value="1" /> </form> </body> </html>

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:
43.93 ms | 403 KiB | 8 Q