Download src/php/php-src/ext/session/tests/bug74514.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 857 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/session/tests/bug74514.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/session/tests/bug74514.phpt
-
curl -L -o bug74514.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/session/tests/bug74514.phpt
857 Bytes
| --TEST-- | |
| Bug #74514 5 session functions incorrectly warn when calling in read-only/getter mode. | |
| --EXTENSIONS-- | |
| session | |
| --SKIPIF-- | |
| include('skipif.inc'); | |
| --FILE-- | |
| /* | |
| CLI ignores HTTP headers at all, i.e. does not output any HTTP headers, | |
| but it still uses SG(headers_sent). | |
| CLI works as Web server, so SG(headers_sent) cannot be ignored nor changed. | |
| Therefore, once HTTP header is considered as sent, these functions emits | |
| 'headers already sent' errors if they try to set new values. | |
| Older PHPs(<7.2) did not care about this misuse on Web SAPI. | |
| */ | |
| var_dump(session_name('foo')); | |
| var_dump(session_name()); | |
| var_dump(session_module_name()); | |
| var_dump(session_save_path()); | |
| var_dump(session_cache_limiter()); | |
| var_dump(session_cache_expire()); | |
| --EXPECTF-- | |
| string(%d) "%S" | |
| string(%d) "%S" | |
| string(%d) "%S" | |
| string(%d) "%S" | |
| string(%d) "%S" | |
| int(%d) | |