Тест - 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 Тест.php

  1. <?php
  2. $arr = [1, 2, 3, 3, 5, 6];
  3. $c = count($arr);
  4. $f = false;
  5. for ($i = 0; $i < 6; $i++)
  6. {
  7.     if ($arr[$i] == $arr[$i + 1])
  8.     {
  9.         $f = true;
  10.         break;
  11.     }
  12.  
  13. }
  14. if ($f == true)
  15. {
  16.     echo 'есть повтор';
  17. }
  18. else
  19. {
  20.     echo 'нет повторов';
  21. }
File Description
  • Тест
  • PHP Code
  • 27 Jun-2022
  • 273 Bytes
You can Share it: