fatfree
fatfree copied to clipboard
@variable ?? ''
In the templating engine, I always have to do this: {{@var ?? ''}} Is there a way to have it done directly by F3? so even in php8.2 i can still just write {{@var}} ?
Thanks.
The trick is to define all vars you try to use in a template. If there's no chance to ensure this, you could use the error control operator @
to skip reporting the missing variable, i.e. {{ @@var }}