public static function decodePhpBinary( $data ) {
		if ( !is_string( $data ) ) {
			throw new \InvalidArgumentException( '$data must be a string' );
		}

		$ret = [];
		while ( $data !== '' && $data !== false ) {
			$l = ord( $data[0] );
			if ( strlen( $data ) < ( $l & 127 ) + 1 ) {
				self::$logger->error( 'Unserialize failed: unexpected end of string' );
				return null;
			}

			// "undefined" marker
			if ( $l > 127 ) {
				$data = substr( $data, ( $l & 127 ) + 1 );
				continue;
			}

			$key = substr( $data, 1, $l );
			$data = substr( $data, $l + 1 );
			if ( $data === '' || $data === false ) {
				self::$logger->error( 'Unserialize failed: unexpected end of string' );
				return null;
			}

			list( $ok, $value ) = self::unserializeValue( $data );
			if ( !$ok ) {
				return null;
			}
			$ret[$key] = $value;
		}
		return $ret;
	}