ENXF NET
Administrator
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P.S Member
S.V.I.P Member
V.I.P Member
Collaborate
Registered
- Joined
- Nov 13, 2018
- Messages
- 23,382
- Points
- 823
Reputation:
It would be really nice if the
For example;
PHP:
Which has the logic;
If $entity is null, or if
This would essentially simplify this style of logic significantly;
PHP:
Read more
Continue reading...
??
operator (aka null coalescing operator) was supported in XF templates.For example;
PHP:
$entity.property ?? 'default'
Which has the logic;
If $entity is null, or if
property
does not exist in $entity, or $entity->property
is null, then the value of 'default' is returned.This would essentially simplify this style of logic significantly;
PHP:
($entity && $reaction.isValidKey('property') && $reaction.property !== null) ...
Read more
Continue reading...