Is there any difference between this function in PHP 7.4?
public function foo(string $argumentThatCanBeNull = null) {}
public function bar(?string $argumentThatCanBeNull = null) {}
Is there any difference between this function in PHP 7.4?
public function foo(string $argumentThatCanBeNull = null) {}
public function bar(?string $argumentThatCanBeNull = null) {}
There is no difference as string is nullable by default.
Btw, this was introduced in PHP 7.1: https://www.php.net/manual/en/migration71.new-features.php