Support null coalescing operator (??) in templates

  • Thread starter Thread starter Xon
  • Start date Start date

Xon

Guest
Member
It would be really nice if the ?? 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
Support null coalescing operator (??) in templates

free plugins
minecraft paid for free
mcmarket
mc-market
free minecraft paid plugins
free minecraft plugins
spigotmc
SpigotMC
aac free
ewg free
Minecraft Premium Plugins
ewg free download
litebans free
epicworldgenerator free
free schematics
leaked schematics minecraft
schematics
schematics leaked
schematics free
minecraft schematics free
paid minecraft schematics free
paid minecraft schematics for free
free cracked plugins
free cracked minecraft plugins
plugins
featherboard download
featherboard plugin download
antiaura download
xenforo leaked
xenforo for free
xenforo addons
 
Top