Checking For Names At Different Times¶
<?php
class stdClass {}
// Checked at execution time
interface Iterator {}
// Checked at execution time
function mb_substr() {}
// Checked at compile time
PHP lint detects early to avoid redeclared functions, based on the local PHP executable.
php -l => Cannot redeclare mb_substr().
That detection doesn’t apply to CITE until execution.
php => Cannot declare class stdClass
because the name is already in use``. This is a difference in processing similar information, which may cause late surprises.
See Also¶
When to check for name [Try me]
PHP Features¶
Last updated: 14 July 2026