Test argument missing - 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 Test argument missing.php

  1. <?php
  2.  
  3.  
  4. Class A {
  5.     public function test (string $test, bool $foo) {
  6.         $result = $foo 'true' : 'false';
  7.         var_dump($result);
  8.     }
  9. }
  10.  
  11. $a = new A();
  12.  
  13. $a->test('bonjour', true);
  14. $a->test('bonjour');
File Description
  • Test argument missing
  • PHP Code
  • 28 Oct-2019
  • 212 Bytes
You can Share it: