public static function thumb($obj = null, $options = array()) { if ($obj) { $thumb = new thumb($obj, $options); return $thumb->url(); } else { return "http://placehold.it/" . $options['width'] . "x" . $options['height'] . "&text= "; } }
function thumb($obj, $options = array(), $tag = true) { $thumb = new thumb($obj, $options); return $tag ? $thumb->tag() : $thumb->url(); }