1--TEST-- 2pcntl_getcpu() 3--EXTENSIONS-- 4pcntl 5--SKIPIF-- 6<?php 7if (!function_exists("pcntl_getcpu")) die("skip pcntl_getcpu() is not available"); 8if (!function_exists("pcntl_setcpuaffinity")) die("skip pcntl_setcpuaffinity() is not available"); 9if (getenv('SKIP_REPEAT')) die("skip Not repeatable"); 10?> 11--FILE-- 12<?php 13$pid = pcntl_fork(); 14if ($pid == -1) { 15 die("fork failed"); 16} else if ($pid == 0) { 17 var_dump(pcntl_setcpuaffinity(null, [1])); 18 var_dump(pcntl_getcpu()); 19} 20?> 21--EXPECTF-- 22bool(true) 23int(1) 24