1
0
mirror of https://github.com/php/php-src.git synced 2026-04-23 07:58:20 +02:00
Files
archived-php-src/ext/phar/tests/create_new_phar.phpt
T
Nikita Popov 7485978339 Migrate SKIPIF -> EXTENSIONS (#7138)
This is an automated migration of most SKIPIF extension_loaded checks.
2021-06-11 11:57:42 +02:00

26 lines
736 B
PHP

--TEST--
Phar: create a completely new phar
--EXTENSIONS--
phar
--INI--
phar.readonly=0
phar.require_hash=1
--FILE--
<?php
file_put_contents('phar://' . __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php/a.php',
"brand new!\n");
include 'phar://' . __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php/a.php';
$fileName = "ChineseFile\xE5\x84\xB7\xE9\xBB\x91.php";
file_put_contents('phar://' . __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php/$fileName.php',
'Text in utf8 file.');
include 'phar://' . __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php/$fileName.php';
?>
--CLEAN--
<?php unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
--EXPECT--
brand new!
Text in utf8 file.