xref: /php-src/ext/phar/tests/gh14603.phpt (revision 686afc10)
1--TEST--
2Phar::webPhar GH-14603
3--EXTENSIONS--
4phar
5--CREDITS--
6Yuancheng Jiang
7--FILE--
8PK��������eI�����������a.phpnu�W+A����������hioPK��������eI�`�����������.phar/stub.phpnu�W+A����������<?php
9function s($a)
10{
11    static $b = array("/hi" => false);
12    if (isset($b[$a])) return $b[$a];
13    return $a;
14}
15try {
16	Phar::webPhar("whatever", "index.php", null, array(), "s");
17} catch (\PharException $e) {
18	echo $e->getMessage() . PHP_EOL;
19}
20echo "DONE";
21__HALT_COMPILER();?>
22PK��������eI�����������a.jpgnu�W+A����������hioPK��������eIl�`��������a.phpsnu�W+A����������<?php function hio(){}PK�������!��+�e��������.phar/signature.binnu���A����������������ndpv�i�
22Q9���Gk!2��PK����������eI�������������������������a.phpnu�W+A����������PK����������eI�`���������������������8���.phar/stub.phpnu�W+A����������PK����������eI���������������������t��a.jpgnu�W+A����������PK����������eIl�`���������������������a.phpsnu�W+A����������PK���������!��+�e���������������������.phar/signature.binnu���A����������PK������q��W����
23--EXPECTF--
24%sphar error: end of central directory not found in zip-based phar%s
25DONE
26