1--TEST--
2dl() filename length checks (CVE-2007-4887)
3--SKIPIF--
4<?php
5$enabled_sapi = array('cgi-fcgi', 'cli', 'embed', 'fpm');
6if (!in_array(php_sapi_name(), $enabled_sapi)) {
7	die('skip dl() is not enabled for ' . php_sapi_name());
8}
9?>
10--INI--
11enable_dl=1
12--FILE--
13<?php
14var_dump(dl(str_repeat("a", 8376757)));
15?>
16--EXPECTF--
17
18Warning: dl(): File name exceeds the maximum allowed length of %d characters in %s on line %d
19bool(false)
20