<?php
function isset_or(&$check, $alternate = NULL)
{
return (isset($check)) ? $check : $alternate;
}
$test = array();
echo '$test is ', $test ? 'truthy' : 'empty', ', with ' . count($test) . ' item(s)', "\r\n";
echo '$test[0][0] is ', isset_or($test[0][0], 'not set'), "\r\n";
echo '$test is ', $test ? 'truthy' : 'empty', ', with ' . count($test) . ' item(s)', "\r\n";
echo "\r\n";
var_export($test);
preferences:
74.53 ms | 405 KiB | 5 Q