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

		$ret = [];
		while ( $data !== '' && $data !== false ) {
			$i = strpos( $data, '|' );
			if ( $i === false ) {
				if ( substr( $data, -1 ) !== '!' ) {
					self::$logger->warning( 'Ignoring garbage at end of string' );
				}
				break;
			}

			$key = substr( $data, 0, $i );
			$data = substr( $data, $i + 1 );

			if ( strpos( $key, '!' ) !== false ) {
				self::$logger->warning( "Decoding found a key with unsupported characters: \"$key\"" );
			}

			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;
	}