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
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2020 The PHP Group
All rights reserved.
Last updated: Sun Jul 12 23:01:26 2020 UTC