public static function encodePhpBinary( array $data ) {
		$ret = '';
		foreach ( $data as $key => $value ) {
			if ( strcmp( $key, intval( $key ) ) === 0 ) {
				self::$logger->warning( "Ignoring unsupported integer key \"$key\"" );
				continue;
			}
			$l = strlen( $key );
			if ( $l > 127 ) {
				self::$logger->warning( "Ignoring overlong key \"$key\"" );
				continue;
			}
			$v = self::serializeValue( $value );
			if ( $v === null ) {
				return null;
			}
			$ret .= chr( $l ) . $key . $v;
		}
		return $ret;
	}