true, 'size' => filesize($path), 'readable' => is_readable($path), 'md5' => md5_file($path) ]; } } $gdInfo = function_exists('gd_info') ? gd_info() : 'Not available'; $ttfSupport = function_exists('imagettftext'); echo json_encode([ 'font_dir_exists' => is_dir($fontDir), 'font_dir_path' => realpath($fontDir), 'files' => $files, 'gd_info' => $gdInfo, 'imagettftext_exists' => $ttfSupport ], JSON_PRETTY_PRINT); ?>