(no commit message) master
authorChristian Weiske <cweiske@cweiske.de>
Fri, 27 Feb 2015 22:06:12 +0000 (23:06 +0100)
committerwww-cweiske <www-cweiske@localhost.localdomain>
Fri, 27 Feb 2015 22:06:12 +0000 (23:06 +0100)
makephar.php [new file with mode: 0644]
test-include.php [new file with mode: 0644]
z-output.txt [new file with mode: 0644]

diff --git a/makephar.php b/makephar.php
new file mode 100644 (file)
index 0000000..6890b44
--- /dev/null
@@ -0,0 +1,10 @@
+<?php\r
+if (file_exists('test.phar')) {\r
+    unlink('test.phar');\r
+}\r
+$phar = new Phar('test.phar');\r
+$phar->addFromString(\r
+    'path/to/foo.php',\r
+    '<?php echo "__FILE__ is: " . __FILE__ . "\n";?>'\r
+);\r
+?>\r
diff --git a/test-include.php b/test-include.php
new file mode 100644 (file)
index 0000000..de0f0d2
--- /dev/null
@@ -0,0 +1,3 @@
+<?php\r
+include 'phar://test.phar/path/to/foo.php';\r
+?>
\ No newline at end of file
diff --git a/z-output.txt b/z-output.txt
new file mode 100644 (file)
index 0000000..a2a167a
--- /dev/null
@@ -0,0 +1 @@
+__FILE__ is: phar:///home/cweiske/Dev/test/phar/test.phar/path/to/foo.php\r