protected static function pack($allowedChildren, $allowedDescendants)
	{
		$allowedChildren    = str_split($allowedChildren,    8);
		$allowedDescendants = str_split($allowedDescendants, 8);

		$allowed = [];
		foreach (array_keys($allowedChildren) as $k)
		{
			$allowed[] = bindec(sprintf(
				'%1$08s%2$08s',
				strrev($allowedDescendants[$k]),
				strrev($allowedChildren[$k])
			));
		}

		return $allowed;
	}
protected static function pack($allowedChildren, $allowedDescendants)
	{
		$allowedChildren    = str_split($allowedChildren,    8);
		$allowedDescendants = str_split($allowedDescendants, 8);

		$allowed = [];
		foreach (array_keys($allowedChildren) as $k)
		{
			$allowed[] = bindec(sprintf(
				'%1$08s%2$08s',
				strrev($allowedDescendants[$k]),
				strrev($allowedChildren[$k])
			));
		}

		return $allowed;
	}
protected static function pack ( $ allowedChildren , $ allowedDescendants ) { $ allowedChildren = str_split ( $ allowedChildren , 8 ) ; $ allowedDescendants = str_split ( $ allowedDescendants , 8 ) ; $ allowed = [ ] ; foreach ( array_keys ( $ allowedChildren ) as $ k ) { $ allowed [ ] = bindec ( sprintf ( '%1$08s%2$08s' , strrev ( $ allowedDescendants [ $ k ] ) , strrev ( $ allowedChildren [ $ k ] ) ) ) ; } return $ allowed ; }
Convert a binary representation such as "101011" to an array of integer

Each bitfield is split in groups of 8 bits, then converted to a 16-bit integer where the
allowedChildren bitfield occupies the least significant bits and the allowedDescendants
bitfield occupies the most significant bits

@param  string    $allowedChildren
@param  string    $allowedDescendants
@return integer[]
Convert a binary representation such as 101011 to an array of integer