Platinum Partner

An Analogue Of ColdFusion's CFPARAM Tag In PHP.


/**
 * Checks if $var is already defined and if not, sets it to
 * $default.
 *
 * @param  $var         Variable to check.
 * @param  $default     Value to give the checked variable if
 *                      found to be null; "" by default.
 * @param  $catchNulls  TRUE: treat empty strings as null; FALSE
 *                      by default.
 *
 * @note   It's a lot like ColdFusion's  tag.
 */
function set_default(&$var, $default="", $catchNulls=FALSE) {
    if (!isset($var) || ($catchNulls && $var == "")) {
        $var = $default;
    }
}

This appears to have stopped working as of PHP 5.
{{ tag }}, {{tag}},

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}
{{ parent.authors[0].realName || parent.author}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks
Tweet

{{parent.nComments}}