scan requests batching - 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 scan requests batching.php

  1. <?php 
  2.  
  3. $total = 1000;
  4.  
  5. while ($total > 0) {
  6.   $batch = intval($total/5);
  7.   echo "Processing $batch scan requests\n";
  8.   $total -= $batch;
  9.   
  10.   if ($batch == 0) {
  11.       break;
  12.   }
  13. }
  14.  
  15. echo "Unprocessed scan requests left: $total\n";
File Description
  • scan requests batching
  • PHP Code
  • 14 Jun-2021
  • 230 Bytes
You can Share it: