0

I found this "??" symbol in resource > ... > reset in the email input field.

is it an itinerary operator or what ?.

{{ $email ?? old('email') }}
Al Jawi
  • 41
  • 5
  • It is the `Null Coalescing Operator`, introduced in PHP 7. – Obsidian Age Feb 04 '20 at 01:22
  • Does this answer your question? [What does double question mark (??) operator mean in PHP](https://stackoverflow.com/questions/53610622/what-does-double-question-mark-operator-mean-in-php) – aceraven777 Feb 04 '20 at 01:22
  • Does this answer your question? [PHP ternary operator vs null coalescing operator](https://stackoverflow.com/questions/34571330/php-ternary-operator-vs-null-coalescing-operator) – Calos Feb 04 '20 at 01:23

1 Answers1

6

This is not a Laravel feature, it is PHP's. It came out in PHP 7, called the null coalescing operator. It basically allows you to put a "default" value if a variable is null or undefined.

Example:

$name = null;

echo $name ?? 'John'; // This will display Jhon
Raed Yakoubi
  • 332
  • 3
  • 8