Skip to content
This repository has been archived by the owner on May 19, 2021. It is now read-only.

it would be nice if there was a specific define set to detect if your script is running within a phar #19

Open
ppetermann opened this issue Jan 14, 2015 · 1 comment

Comments

@ppetermann
Copy link

Aloha,

basically it would be nice to have some sort of define ("BOX_PHAR".. something like that), which explicitely allows to detect if a script is run from within a phar file.

right now I'm abusing the BOX_EXTRACT_PATTERN_DEFAULT one for that, and that feels like a cheat.

@kherge
Copy link
Contributor

kherge commented May 22, 2015

I'll see about adding something like this for the next version of Box.

Currently, the Phar::running() function should fit the bill if the phar extension is available.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants