Hf - PHP Online

Form of PHP Sandbox

Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php in the places where the PHP script should be executed.



Your result can be seen below.

Result of php executing





Full code of Hf.php

  1. <?php
  2. function findPath($m, $size, $s, $t) : bool{
  3.     for($i = 1; $i < $size; $i++) {
  4.         if($m[$s][$i] == )
  5.         if($m[$s][$i] !== 0) {
  6.             findPath($m, $size, $i, $t);
  7.         }
  8.     }
  9. }
  10. $m = [
  11.     [0,2,0,0,0,3],
  12.     [0,0,1,0,0,0],
  13.     [0,0,0,4,0,0],
  14.     [0,0,0,0,0,0],
  15.     [0,0,0,3,0,0],
  16.     [0,0,2,0,1,0]
  17.     ];
  18. var_dump(findPath($m, 6, 2, 4));
File Description
  • Hf
  • PHP Code
  • 24 Apr-2024
  • 363 Bytes
You can Share it: