{"success":true,"data":{"ext":"php3","name":"PHP3","description":"PHP3 is a legacy server-side script file associated with PHP 3, the open-source scripting language created by Rasmus Lerdorf and later maintained by the PHP development community. It is used to generate dynamic web pages, process forms, and interact with databases on web servers configured to interpret PHP content. As an obsolete format, it may still be encountered in older applications, and its safety depends on server configuration and the trustworthiness of the script source.","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","php4"],"usage":{"python":"def is_php3(file_path: str) -> bool:\n    \"\"\"Check if file is a valid PHP3 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 isPHP3(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x3C, 0x3F, 0x70, 0x68, 0x70]);\n  return buffer.subarray(0, 5).equals(signature);\n}","go":"func IsPHP3(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}"}}}