Skip to content

__DIR__ inside phar file in HHVM is not the same as in PHP5 #4313

@nazar-pc

Description

@nazar-pc

I've create regular phar archive with stub:

<?php
if (PHP_SAPI == 'cli') {
    Phar::mapPhar('cleverstyle_cms.phar');
    include 'phar://cleverstyle_cms.phar/install.php';
} else {
    Phar::webPhar(null, 'install.php');
}
__HALT_COMPILER();

When running from CLI inside install.php __DIR__ constant is not the same.

PHP5:

$ php distributive.phar.php
phar:///web/test.com/www/distributive.phar.php

HHVM:

$ hhvm distributive.phar.php
phar://cleverstyle_cms.phar

I'm not familiar enough with HHVM codebase to find where it occurs and to fix it.

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