1--TEST-- 2Bug #47566 (return value of pcntl_wexitstatus()) 3--EXTENSIONS-- 4pcntl 5--FILE-- 6<?php 7$pid = pcntl_fork(); 8if ($pid == -1) { 9 echo "Unable to fork"; 10 exit; 11} elseif ($pid) { 12 $epid = pcntl_waitpid(-1,$status); 13 var_dump(pcntl_wexitstatus($status)); 14} else { 15 exit(128); 16} 17?> 18--EXPECT-- 19int(128) 20