{"success":true,"data":{"ext":"php4","name":"PHP4","description":"PHP4 is a legacy file format for PHP source code, maintained by the PHP Group as part of the PHP scripting language ecosystem. It is used for server-side web applications, dynamic page generation, and embedded scripting in HTML-based sites. PHP4 is an obsolete branch of PHP and is no longer supported, so files should be reviewed carefully when handling older web projects, although the format itself is not inherently dangerous.","mime":["text/x-php"],"risk_level":"Safe","signatures":[{"hex":"3C 3F 70 68 70","offset":0,"sources":[{"name":"Apache Tika","url":"https://raw.githubusercontent.com/apache/tika/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml"}]}],"related":["php","php3"],"usage":{"python":"def is_php4(file_path: str) -> bool:\n    \"\"\"Check if file is a valid PHP4 by magic bytes.\"\"\"\n    signature = bytes([0x3C, 0x3F, 0x70, 0x68, 0x70])\n    with open(file_path, \"rb\") as f:\n        return f.read(5) == signature","node":"function isPHP4(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x3C, 0x3F, 0x70, 0x68, 0x70]);\n  return buffer.subarray(0, 5).equals(signature);\n}","go":"func IsPHP4(data []byte) bool {\n    signature := []byte{0x3C, 0x3F, 0x70, 0x68, 0x70}\n    if len(data) < 5 {\n        return false\n    }\n    return bytes.Equal(data[:5], signature)\n}"}}}