define("PI", 3.14159); echo PI;
class Config { public static $dbhost = 'localhost'; public static $dbuser = 'username'; public static $dbpass = 'password'; public static $dbname = 'database'; } echo Config::$dbhost;
class Errors { public static $messages = [ 404 => "Page not found", 500 => "Internal server error", 403 => "Forbidden access" ]; } echo Errors::$messages[404];These examples use PHP's built-in functionality for defining static data. There is no specific package or library required to use static data in PHP.