php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79362 In a phar file, __halt_compiler fails if lowercase
Submitted: 2020-03-10 13:30 UTC Modified: 2020-06-17 11:28 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: aine at exivity dot com Assigned: cmb (profile)
Status: Not a bug Package: PHAR related
PHP Version: 7.3.15 OS: Windows
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: aine at exivity dot com
New email:
PHP Version: OS:

 

 [2020-03-10 13:30 UTC] aine at exivity dot com
Description:
------------
---
From manual page: https://php.net/function.halt-compiler
---

In the PHP docs, __half_compiler is lowercase, but if this is used in a phar file, it breaks:

PHP Fatal error:  Uncaught PharException: manifest cannot be larger than 100 MB in phar "/build/myphar.phar" in /build/myphar.phar:9

It needs to be uppercase. Then it works.
Is it possible for it to work in lowercase inside a phar file?

Test script:
---------------
stub.php:

<?php __halt_compiler();

build:
$phar = new Phar('myphar');
$phar->setStub(file_get_contents('stub.php'));

Run the built file.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-03-10 13:47 UTC] requinix@php.net
-Package: Compile Failure +Package: PHAR related
 [2020-06-17 11:28 UTC] cmb@php.net
-Status: Open +Status: Not a bug -Assigned To: +Assigned To: cmb
 [2020-06-17 11:28 UTC] cmb@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

See <https://www.php.net/manual/en/phar.fileformat.stub.php>.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 15:01:29 2024 UTC