worker-getopt.php 334 B

12345678910111213141516171819
  1. <?php
  2. do {
  3. $ok = frankenphp_handle_request(function (): void {
  4. print_r($_SERVER);
  5. });
  6. getopt('abc');
  7. if (!isset($_SERVER['HTTP_REQUEST'])) {
  8. exit(1);
  9. }
  10. if (isset($_SERVER['FRANKENPHP_WORKER'])) {
  11. exit(2);
  12. }
  13. if (isset($_SERVER['FOO'])) {
  14. exit(3);
  15. }
  16. } while ($ok);