Skip to content

Instantly share code, notes, and snippets.

<?php
$x = isset($a) ? $a : (isset($b) ? $b : $c);
if (isset($a)) {
$x = $a;
} elseif (isset($b)) {
$x = $b;
} else {
$x = $c;
}
<?php
public function select($sqlQuery,$param=array()) {
if(!is_array($param)) {
$param = array_shift(func_get_args());
}
return $this->query($sqlQuery,$param,self::QUERY_TYPE_SELECT);
}