Skip to content

Commit f93a172

Browse files
committed
minor #17868 Null Coalescing Operator (shafan)
This PR was merged into the 6.2 branch. Discussion ---------- Null Coalescing Operator Use Null Coalescing Operator instead of isset ? : Commits ------- 8063947 Null Coalescing Operator
2 parents ef6a0b7 + 8063947 commit f93a172

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

create_framework/routing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ template as follows:
3535
.. code-block:: html+php
3636

3737
<!-- example.com/src/pages/hello.php -->
38-
Hello <?= htmlspecialchars(isset($name) ? $name : 'World', ENT_QUOTES, 'UTF-8') ?>
38+
Hello <?= htmlspecialchars($name ?? 'World', ENT_QUOTES, 'UTF-8') ?>
3939

4040
Now, we are in good shape to add new features.
4141

0 commit comments

Comments
 (0)