Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

PHP Warning: Constant already defined when processing multiple sources with __halt_compiler() #18850

Closed
@ProgerXP

Description

@ProgerXP

Description

Whenever PHP processes more then one__halt_compiler() statement in one session, it emits this cryptic warning:

PHP Warning:  Constant  already defined in ...

Note the empty constant name.

There are several ways to trigger this. Here's one:

# echo '<?php __halt_compiler();' >inc.php# php -aphp > include('inc.php');php > include('inc.php');PHP Warning:  Constant  already defined in /tmp/inc.php on line 1

Here's another:

# php -r "eval('?><?php __halt_compiler();'); eval('?><?php __halt_compiler();');"

PHP Version

PHP 8.4.5 (cli) (built: Mar 12 2025 16:58:15) (NTS)Copyright (c) The PHP GroupZend Engine v4.4.5, Copyright (c) Zend Technologies

Operating System

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp