gq - 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 gq.php

  1. <?php
  2.  
  3. $error = 0;
  4.  
  5. for ($x = 1; $x <= 1; $x++) {
  6.   $num = substr(hexdec(substr(hash("md5", /*random_bytes(mt_rand(1, 50))*/"application"), 0, 10)), 0, 10);
  7.   if (strlen($num) != 10) {
  8.       $error += 1;
  9.   }
  10.   echo "<p>" . strlen($num) . " - $num</p>";
  11. }
  12.  
  13. echo "<p>$error</p>";
  14.  
File Description
  • gq
  • PHP Code
  • 15 Aug-2019
  • 278 Bytes
You can Share it: