xref: /PHP-8.0/ext/phar/tests/bug66960.phpt (revision 0b04b934)
1--TEST--
2Bug #66960 phar long filename crash
3--SKIPIF--
4<?php if (!extension_loaded("phar")) die("skip"); ?>
5--INI--
6phar.readonly = 0
7memory_limit = -1
8--FILE--
9<?php
10$file = __DIR__ . DIRECTORY_SEPARATOR . 'bug66960.phar';
11$phar = new Phar($file);
12var_dump(file_exists("phar://$file/". str_repeat('a', PHP_MAXPATHLEN-1)));
13var_dump(file_exists("phar://$file/". str_repeat('a', PHP_MAXPATHLEN)));
14var_dump(file_exists("phar://$file/". str_repeat('a', PHP_MAXPATHLEN+1)));
15echo 'done';
16?>
17--CLEAN--
18<?php
19$file = __DIR__ . DIRECTORY_SEPARATOR . 'bug66960.phar';
20unlink($file);
21?>
22--EXPECT--
23bool(false)
24bool(false)
25bool(false)
26done
27