function getHeight($path) { try { $image = new BrImage($path); return $image->height(); } catch (Exception $e) { return 0; } }