Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion content/07-conditionals.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ $language = 'english';
echo $language == 'spanish' ? "hola\n" : "hello\n";
```

Lastly, there is another form of a ternary that checks if a value is set and then returns the value to the right of the two question marks if the value is null.
Lastly, there is another form of a ternary that checks if a value is set and then returns the value to the right of the two question marks if the value is null. Otherwise, if the value is set it returns the content of the variable.
```php
echo $IDoNotExist ?? "Variable not set\n";
```
Expand Down