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;
	}
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;
	}
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 ; }
Decode a session string in 'php_binary' format to an array
@note Generally you'll use self::decode() instead of this method.
@param string $data Session data. Use the same caution in passing
user-controlled data here that you would to PHP's unserialize function.
@return array|null Data, or null on failure
@throws \\InvalidArgumentException
Decode a session string in php_binary format to an array