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

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