| Server IP : 217.160.0.95 / Your IP : 216.73.216.242 Web Server : Apache System : Linux infong-uk56 4.4.400-icpu-108 #2 SMP Wed Feb 11 11:51:01 UTC 2026 x86_64 User : u78863098 ( 10368940) PHP Version : 8.4.24 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/lib/php8.4/test/Cache_Lite/tests/ |
Upload File : |
<?php
/**
* @author Markus Tacker <tacker@php.net>
*/
/**
* @const String Temp dir for cache files
*/
define('TEST_TMP_DIR_DEFAULT', __DIR__ . DIRECTORY_SEPARATOR . 'tmp' . DIRECTORY_SEPARATOR);
/**
* Returns a directory to use for temp files.
*
* The dir is now hard coded to a local dir to make the tests runnable
* under jenkins where there is no write access to the system temp dir.
*
* The reason for this solution is, that with phpt files a given
* --bootstrap file is ignored.
*
* @author Markus Tacker <tacker@php.net>*
* @static
* @access public
* @return string The system tmp directory
*/
function tmpDir()
{
if (defined('TEST_TMP_DIR')) return TEST_TMP_DIR;
return TEST_TMP_DIR_DEFAULT;
}
// Create directory if not exists
if (!is_dir(tmpDir())) mkdir(tmpDir());
// Clean up afterwards
register_shutdown_function(function()
{
exec('rm -rf ' . tmpDir());
});