Download src/php/php-src/ext/pcntl/tests/pcntl_getcpu.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 507 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pcntl/tests/pcntl_getcpu.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/pcntl/tests/pcntl_getcpu.phpt
-
curl -L -o pcntl_getcpu.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pcntl/tests/pcntl_getcpu.phpt
507 Bytes
| --TEST-- | |
| pcntl_getcpu() | |
| --EXTENSIONS-- | |
| pcntl | |
| --SKIPIF-- | |
| if (!function_exists("pcntl_getcpu")) die("skip pcntl_getcpu() is not available"); | |
| if (!function_exists("pcntl_setcpuaffinity")) die("skip pcntl_setcpuaffinity() is not available"); | |
| if (getenv('SKIP_REPEAT')) die("skip Not repeatable"); | |
| --FILE-- | |
| $pid = pcntl_fork(); | |
| if ($pid == -1) { | |
| die("fork failed"); | |
| } else if ($pid == 0) { | |
| var_dump(pcntl_setcpuaffinity(null, [1])); | |
| var_dump(pcntl_getcpu()); | |
| } | |
| --EXPECTF-- | |
| bool(true) | |
| int(1) | |