Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

send parameter to function in php can null

function foo(?Type $t) {
}
this will result in

$this->foo(new Type()); // ok
$this->foo(null); // ok
$this->foo(); // error
 
PREVIOUS NEXT
Tagged: #send #parameter #function #php #null
ADD COMMENT
Topic
Name
8+8 =