X7ROOT File Manager
Current Path:
/opt/alt/tests/alt-php82-pecl-apcu_5.1.23-1.el8/tests
opt
/
alt
/
tests
/
alt-php82-pecl-apcu_5.1.23-1.el8
/
tests
/
ðŸ“
..
📄
apc_001.phpt
(513 B)
📄
apc_002.phpt
(481 B)
📄
apc_003b.phpt
(1.74 KB)
📄
apc_003b_legacy.phpt
(1.69 KB)
📄
apc_004.phpt
(654 B)
📄
apc_005.phpt
(635 B)
📄
apc_005b.phpt
(705 B)
📄
apc_005c.phpt
(800 B)
📄
apc_006.phpt
(1.13 KB)
📄
apc_006_php73.phpt
(1.02 KB)
📄
apc_006_php81.phpt
(1.25 KB)
📄
apc_007.phpt
(1.05 KB)
📄
apc_008.phpt
(838 B)
📄
apc_010.phpt
(1.3 KB)
📄
apc_011.phpt
(380 B)
📄
apc_012.phpt
(606 B)
📄
apc_013_exists.phpt
(407 B)
📄
apc_014_store_ref.phpt
(392 B)
📄
apc_015.phpt
(255 B)
📄
apc_016.phpt
(613 B)
📄
apc_017.phpt
(326 B)
📄
apc_018.phpt
(193 B)
📄
apc_019.phpt
(732 B)
📄
apc_020.phpt
(802 B)
📄
apc_021.phpt
(903 B)
📄
apc_022.phpt
(620 B)
📄
apc_023.phpt
(1.15 KB)
📄
apc_024.phpt
(327 B)
📄
apc_025.phpt
(423 B)
📄
apc_099.phpt
(399 B)
📄
apc_disabled.phpt
(1.83 KB)
📄
apc_entry_001.phpt
(523 B)
📄
apc_entry_002.phpt
(434 B)
📄
apc_entry_003.phpt
(284 B)
📄
apc_entry_recursion.phpt
(374 B)
📄
apc_inc_perf.phpt
(548 B)
📄
apc_store_array_int_keys.phpt
(382 B)
📄
apc_store_array_with_refs.phpt
(254 B)
📄
apc_store_reference.phpt
(635 B)
📄
apc_store_reference_php8.phpt
(606 B)
📄
apc_store_string_reuse.phpt
(217 B)
📄
apcu_fetch_empty_array_reference.phpt
(693 B)
📄
apcu_sma_info.phpt
(583 B)
ðŸ“
bad
📄
bug76145.phpt
(886 B)
ðŸ“
data
📄
get_included_files_inc1.inc
(28 B)
📄
get_included_files_inc2.inc
(87 B)
📄
get_included_files_inc3.inc
(87 B)
📄
ghbug168.phpt
(469 B)
📄
ghbug185.phpt
(1.12 KB)
📄
ghbug247.phpt
(324 B)
📄
ghbug248.phpt
(2.92 KB)
📄
ghbug335-fail.phpt
(680 B)
📄
ghbug335.phpt
(673 B)
📄
iterator_001.phpt
(1.73 KB)
📄
iterator_002.phpt
(541 B)
📄
iterator_003.phpt
(1.75 KB)
📄
iterator_004.phpt
(594 B)
📄
iterator_005.phpt
(1.78 KB)
📄
iterator_006.phpt
(16.52 KB)
📄
iterator_007.phpt
(1.37 KB)
📄
iterator_008.phpt
(512 B)
📄
iterator_009.phpt
(382 B)
📄
iterator_010.phpt
(942 B)
📄
iterator_011.phpt
(665 B)
📄
not_enough_shm.phpt
(329 B)
📄
server_test.inc
(4.22 KB)
📄
skipif.inc
(79 B)
📄
sma001.phpt
(575 B)
📄
typed_prop.phpt
(678 B)
Editing: server_test.inc
<?php /* based on sapi/cli/tests/php_cli_server.inc */ define ("PHP_CLI_SERVER_HOSTNAME", "127.0.0.1"); define ("PHP_CLI_SERVER_PORT", 8000 + PHP_INT_SIZE*1000 + PHP_MAJOR_VERSION*100 + PHP_MINOR_VERSION*10); define ("PHP_CLI_SERVER_ADDRESS", PHP_CLI_SERVER_HOSTNAME.":".PHP_CLI_SERVER_PORT); /* XXX incapsulate all this globals into a class when have a favourable minute */ $doc_root = __DIR__; $router = "index.php"; $handles = array(); $ports = array(); $num_servers = 3; function server_start_one($host, $port, $code = 'echo "Hello world";', $php_opts = array(), $no_router = FALSE) { global $doc_root, $router, $handles, $ports; $php_executable = getenv('TEST_PHP_EXECUTABLE'); $php_args = getenv('TEST_PHP_ARGS'); $descriptorspec = array( 0 => STDIN, 1 => STDOUT, 2 => STDERR, ); if (!$php_args) { $ext = (substr(PHP_OS, 0, 3) == 'WIN') ? 'php_apcu.dll' : 'apcu.so'; if (substr(PHP_OS, 0, 3) == 'WIN') { $part0 = 8 == PHP_INT_SIZE ? "x64" : ""; $part1 = ZEND_DEBUG_BUILD ? "Debug" : "Release"; $part1 = PHP_ZTS ? ($part1 . "_TS") : $part1; $php_args = "-d extension_dir=$doc_root/../$part0/$part1"; } else { $php_args = "-d extension_dir=$doc_root/../modules"; } $php_args = "$php_args -d extension=$ext"; } if ($php_opts) { $php_args = "$php_args -d " . implode(' -d ', $php_opts);; } if (substr(PHP_OS, 0, 3) == 'WIN') { $cmd = "{$php_executable} -n $php_args -t {$doc_root} -S $host:$port"; if (!$no_router) { $cmd .= " {$router}"; } $descriptorspec[2] = array('pipe', 'w'); $handle = proc_open(addslashes($cmd), $descriptorspec, $pipes, $doc_root, NULL, array("bypass_shell" => true, "suppress_errors" => true)); } else { $cmd = "exec {$php_executable} -n $php_args -t {$doc_root} -S $host:$port"; if (!$no_router) { $cmd .= " {$doc_root}/{$router}"; } $cmd .= " 2>/dev/null"; $handle = proc_open($cmd, $descriptorspec, $pipes, $doc_root); } // note: even when server prints 'Listening on localhost:8964...Press Ctrl-C to quit.' // it might not be listening yet...need to wait until fsockopen() call returns // Let this wait for up to 10 seconds to avoid spurious failures with valgrind. $i = 0; while (($i++ < 100) && !connection_test($host, $port)) { usleep(100000); } return $handle; } function server_start($code = 'echo "Hello world";', $php_opts = array(), $no_router = FALSE) { global $doc_root, $router, $handles, $ports, $num_servers; if ($code) { file_put_contents($doc_root . '/' . $router, '<?php ' . $code . ' ?>'); } for ($i = 0; $i < $num_servers; $i++) { $h = server_start_one(PHP_CLI_SERVER_HOSTNAME, PHP_CLI_SERVER_PORT+$i, $code, $php_opts, $no_router); $handles[] = $h; } register_shutdown_function( function($handles) use($router) { foreach ($handles as $handle) { proc_terminate($handle); } @unlink(__DIR__ . "/{$router}"); }, $handles ); // don't bother sleeping, server is already up // server can take a variable amount of time to be up, so just sleeping a guessed amount of time // does not work. this is why tests sometimes pass and sometimes fail. to get a reliable pass // sleeping doesn't work. } function get_response($fp, $data_only = true) { $s = ''; while (!feof($fp)) { $s .= fgets($fp); } if ($data_only) { $parts = explode("\r\n\r\n", $s); $s = $parts[1]; } return $s; } function connection_test($host, $port) { $port = intval($port)?:80; $fp = @fsockopen($host, $port, $errno, $errstr, 10); if (!$fp) { return false; } $send = "GET / HTTP/1.1\nHost: {$host}\r\n\r\n"; /* will not out here, just test if the connection has worked*/ if(@fwrite($fp, $send)) { get_response($fp); fclose($fp); return true; } @fclose($fp); return false; } function run_test_simple($request_uri = NULL) { global $num_servers; $send = "GET /" . $request_uri ." HTTP/1.1\nHost: " . PHP_CLI_SERVER_HOSTNAME . "\r\n\r\n"; for ($i = 0; $i < $num_servers; $i++) { run_test(PHP_CLI_SERVER_HOSTNAME, PHP_CLI_SERVER_PORT+$i, $send); } } function run_test($host, $port, $send) { $fp = fsockopen($host, $port, $errno, $errstr, 10); if (!$fp) { die(sprintf("connect failed errno=%d errstr='%s'", $errno, $errstr)); } if(fwrite($fp, $send)) { echo get_response($fp); } fclose($fp); }
Upload File
Create Folder