optional

1.0 1.1 1.2 1.3

Prints out a variable without any notice if it doesn’t exist.

<?php
optional(mixed $value)

Examples

Example #1

index.tpl
{optional $var}

The above example will output:

(nothing if $var isn't defined, but no warning either)