Created
May 24, 2020 11:56
-
-
Save AnrDaemon/10ce8011e5558aa7cbe5c58914b611b4 to your computer and use it in GitHub Desktop.
PHAR / stream_resolve_include_path test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
print __DIR__ . "\n"; | |
print __FILE__ . "\n"; | |
print getcwd() . "\n"; | |
var_dump(stream_resolve_include_path(basename(__FILE__))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SHELL := /bin/sh | |
.SHELLFLAGS := -ec | |
.ONESHELL: | |
PHAR_FILES := index.php | |
clean: | |
-rm index.php example.phar | |
dist-clean: clean | |
-rm stub.php | |
release: release-phar | |
release-phar: example.phar | |
stub: stub.php | |
%.php: %.sample.php | |
cp "$<" "$@" | |
example.phar: stub.php $(PHAR_FILES) | |
phar pack -f "$@" -c bzip2 -s $^ | |
.PHONY: clean dist-clean stub release ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'phar://' . __FILE__ . '/index.php'; | |
__HALT_COMPILER(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment