public static function forks($number, callable $childHandler = null)
    {
        $num = (int)$number > 0 ? (int)$number : 0;

        if ($num <= 0) {
            return false;
        }

        $pidAry = [];

        for ($id = 0; $id < $num; $id++) {
            $child = self::fork($id, $childHandler);
            $pidAry[$child['pid']] = $child;
        }

        return $pidAry;
    }
public static function forks($number, callable $childHandler = null)
    {
        $num = (int)$number > 0 ? (int)$number : 0;

        if ($num <= 0) {
            return false;
        }

        $pidAry = [];

        for ($id = 0; $id < $num; $id++) {
            $child = self::fork($id, $childHandler);
            $pidAry[$child['pid']] = $child;
        }

        return $pidAry;
    }
public static function forks ( $ number , callable $ childHandler = null ) { $ num = ( int ) $ number > 0 ? ( int ) $ number : 0 ; if ( $ num <= 0 ) { return false ; } $ pidAry = [ ] ; for ( $ id = 0 ; $ id < $ num ; $ id ++ ) { $ child = self :: fork ( $ id , $ childHandler ) ; $ pidAry [ $ child [ 'pid' ] ] = $ child ; } return $ pidAry ; }
fork multi child processes.
@param int $number
@param callable|null $childHandler
@return array|int
fork multi child processes .