Parses the data coming back from phpinfo() call and returns in an array

@return array
357724
public static function getPhpInfo()
    {
        $html = null;
        $info = [];
        $pattern =
            '#(?:<h2>(?:<a name=".*?">)?(.*?)(?:</a>)?</h2>)|(?:<tr(?: class=".*?")?><t[hd](?: class=".*?")?>(.*?)\s*</t[hd]>(?:<t[hd](?: class=".*?")?>(.*?)\s*</t[hd]>(?:<t[hd](?: class=".*?")?>(.*?)\s*</t[hd]>)?)?</tr>)#s';

        \ob_start();
        @\phpinfo();
        $html = \ob_get_contents();
        \ob_end_clean();

        if (preg_match_all($pattern, $html, $matches, PREG_SET_ORDER)) {
            foreach ($matches as $match) {
                $keys = array_keys($info);
                $lastKey = end($keys);

                if (strlen($match[1])) {
                    $info[$match[1]] = [];
                } elseif (isset($match[3])) {
                    $info[$lastKey][$match[2]] = isset($match[4]) ? [$match[3], $match[4]] : $match[3];
                } else {
                    $info[$lastKey][] = $match[2];
                }

                unset($keys, $match);
            }
        }

        return static::cleanPhpInfo($info);
    }
682009
public function _info()
    {
        $inf = array();
        $ar  = array();
        foreach ($this->attribs as $i => $a) {
            $ar[$i] = self::html_attr2str($a);
        }

        $inf['attribs']   = $ar;
        $inf['attrs']     = $this->attrs;
        $inf['idx_attr']  = $this->idx_attr;
        $inf['tag_idx']   = $this->tag_idx;
        $inf['attr_idx']  = $this->attr_idx;
        $inf['class_idx'] = $this->class_idx;

        $lev = array();
        $nm  = array();
        $st  = array();
        $pb  = -1;
        $pe  = PHP_INT_MAX;
        $l   = 0;
        foreach ($this->ids as $b => $e) {
            if ($pb < $b && $b < $pe) {
                $st[]          = array($pb, $pe);
                list($pb, $pe) = array($b, $e);
            } else {
                while ($pe < $b && $st) {
                    list($pb, $pe) = array_pop($st);
                }
            }

            $nm[$b]  = $this->tags[$b];
            $lev[$b] = count($st);
        }
        foreach ($nm as $b => &$n) {
            $n = str_repeat(' -', $lev[$b]) . ' < ' . $n . ' ' . $this->get_attr_byId($b, null, true) . ' >';
        }
        $nm           = implode("\n", $nm);
        $inf['struc'] = $nm;
        unset($lev, $st, $nm);
        return $inf;
    }
264848
protected function parse()
    {
        if ($this->hasElement()) {
            return $this->getElement();
        }

        $stack = [];
        foreach ($this->stack as $offset => $where) {
            $stack[$offset] = $where->parse();
        }

        return sprintf('(%s)', join(sprintf(' %s ', $this->operator), $stack));
    }
716421
public function getResult()
    {
        $result = curl_getinfo($this->resource);

        if (curl_errno($this->resource)) {
            $result['error'] = curl_error($this->resource);
        }

        return [
            'url' => isset($result['url']) ? $result['url'] : null,
            'statusCode' => isset($result['http_code']) ? $result['http_code'] : null,
            'contentType' => isset($result['content_type']) ? $result['content_type'] : null,
            'info' => $result,
            'content' => $this->body,
            'headers' => $this->headers,
            'data' => $this->data,
        ];
    }
775586
public function info()
    {
        $data = [
            'traceId' => $this->traceId,
            'spanId' => $this->spanId,
            'type' => $this->type
        ];
        if ($this->attributes) {
            $data['attributes'] = $this->attributes->info();
        }

        return $data;
    }
1132034
public function __toArray()
    {
        $result = [];
        if ($this->status !== null) {
            $result['status'] = $this->status;
        }
        if ($this->code !== null) {
            $result['code'] = $this->code;
        }
        if ($this->title !== null) {
            $result['title'] = $this->title;
        }
        return $result;
    }
325919
protected function parsePost()
    {
        $ret = $_POST ?: [];
        if (isset($_FILES)) {
            foreach ($_FILES as $name => $info) {
                if (is_array($info["name"])) {
                    $len = count($info["name"]);
                    for ($i = 0; $i < $len; $i++) {
                        $file = $this->createUploadedFile([
                            "name" => $info["name"][$i] ?? "",
                            "type" => $info["type"][$i] ?? "",
                            "tmp_name" => $info["tmp_name"][$i] ?? "",
                            "error" => $info["error"][$i] ?? 0,
                            "size" => $info["size"][$i] ?? 0,
                        ]);
                        \sndsgd\Arr::addValue($ret, $name, $file);
                    }
                } else {
                    $file = $this->createUploadedFile($info);
                    \sndsgd\Arr::addValue($ret, $name, $file);
                }
            }
        }
        return $ret;
    }
20873
public function getInfo()
	{
		if ($this->error || !$this->sql) {
			return null;
		}

		$query = 'EXPLAIN FORMAT=JSON ' . $this->sql;
		$query = $this->db->getPdo()->query($query);

		$data = [];
		if ($query) {
			$data = $query->fetch();
		}

		$data = Json::decode($data['EXPLAIN'] ?? '[]');

		return Dumper::toHtml($data, [
			Dumper::COLLAPSE => true,
			Dumper::DEPTH => 6,
		]);
	}
1076656
protected function getData()
    {
        $data = [];
        foreach ($this->data as $dataValue) {
            $row = [];
            foreach ($this->table->getColumns() as $column) {
                if ($column instanceof ColumnInterface) {
                    $row[$column->getData()] = $column->getContent($dataValue);
                    continue;
                }

                if (is_callable($column->getFormatter())) {
                    $row[$column->getData()] = call_user_func_array(
                        $column->getFormatter(),
                        [
                            $dataValue[$column->getData()],
                            $dataValue
                        ]
                    );
                } else {
                    $row[$column->getData()] = (string)$dataValue[$column->getData()];
                }
            }
            $data[] = $row;
        }

        return $data;
    }
1204515
public function getData()
    {
        $result['type'] = $this->type;
        $result['title'] = $this->title;

        switch($this->type)
        {
            case self::TYPE_POSTBACK:
                $result['payload'] = $this->data;
            break;

            case self::TYPE_WEB:
              $result['url'] = $this->data;
              
              if ($this->webview_height_ratio) {
                  $result['webview_height_ratio'] = $this->webview_height_ratio;
              }
              
              if ($this->messenger_extensions){
                  $result['messenger_extensions'] = $this->messenger_extensions;
                  $result['fallback_url'] = $this->fallback_url;
              }
              
              if($this->webview_share_button){
                  $result['webview_share_button'] = $this->webview_share_button;
              }
            break;
            
            case self::TYPE_NESTED:
                foreach ($this->data as $item) {
                    $result['call_to_actions'][] = $item->getData();
                }
            break;
        }
        return $result;
    }
1028601
public function getData()
    {
        try {
            $this->parse();
            $organized_statements = array();
            foreach ($this->dependencies as $name=>$preset) {
                foreach ($preset->getStatements() as $type=>$statements) {
                    if (!isset($organized_statements[$type])) {
                        $organized_statements[$type] = array();
                    }
                    foreach ($statements as $statement) {
                        $organized_statements[$type][] = $statement;
                    }
                }
            }
            foreach ($organized_statements as $type=>$stacks) {
                $organized_statements[$type] = $preset->getOrderedStatements($stacks);
            }
        } catch (\Exception $e) {
            throw $e;
        }
        return $organized_statements;
    }
1337914
protected function parseConnectionInformation()
    {
        if ( ( $info = @parse_url( $this->dsn ) ) === false )
        {
            fwrite( $this->stderr, "Could not parse provided DSN: {$this->dsn}\n" );
            return false;
        }

        foreach ( $info as $key => $value )
        {
            if ( array_key_exists( $key, $this->connectionInfo ) )
            {
                $this->connectionInfo[$key] = $value;
            }
        }

        if ( isset( $this->options['username'] ) )
        {
            $this->connectionInfo['user'] = $this->options['username'];
        }

        if ( isset( $this->options['password'] ) )
        {
            $this->connectionInfo['pass'] = $this->options['password'];
        }

        return true;
    }
521668
private function ParseDataFromGlobalVar() {
        $postData = filter_input_array(INPUT_POST);
        if (is_null($postData)) {
            return array();
        }
        $postDataCleaned = $this->FetchData($postData);
        return $postDataCleaned;
    }
1115559
protected function getArrayInternal()
    {
        if ($this->isArray($this->resource)) {
            return $this->resource;
        }

        return $this->parseIniString($this->resource);
    }
792968
protected function parse()
    {
        $data = $this->_source->getData();

        $prefilters = $this->getPreFilterInstances();
        foreach($prefilters as $prefilter) {
            $data = $prefilter->filter($data);
        }

        $realpath = $this->_source->getRealPath();
        $parser = new PHPTAL_Dom_SaxXmlParser($this->_encoding);

        $builder = new PHPTAL_Dom_PHPTALDocumentBuilder();
        $tree = $parser->parseString($builder, $data, $realpath)->getResult();

        foreach($prefilters as $prefilter) {
            if ($prefilter instanceof PHPTAL_PreFilter) {
                if ($prefilter->filterDOM($tree) !== NULL) {
                    throw new PHPTAL_ConfigurationException("Don't return value from filterDOM()");
                }
            }
        }

        $state = new PHPTAL_Php_State($this);

        $codewriter = new PHPTAL_Php_CodeWriter($state);
        $codewriter->doTemplateFile($this->getFunctionName(), $tree);

        return $codewriter->getResult();
    }
740792
private function parseUpdates()
    {
        $updates = [];

        while (true) {
            $property = [
                'selector' => null,
                'name'     => null,
                'value'    => null,
            ];

            // parse left side
            $selectorName = $this->scanner->fetchNextToken();
            $delimiter = $this->scanner->fetchNextToken();

            if ($delimiter !== '.') {
                $property['selector'] = null;
                $property['name'] = $selectorName;
                $next = $delimiter;
            } else {
                $property['selector'] = $selectorName;
                $property['name'] = $this->scanner->fetchNextToken();
                $next = $this->scanner->fetchNextToken();
            }

            // parse right side
            $property['value'] = $this->parseOperand();

            $updates[] = $property;

            $next = $this->scanner->lookupNextToken();

            if ($next == ',') {
                $next = $this->scanner->fetchNextToken();
            } elseif (strtolower($next) == 'where' || !$next) {
                break;
            }
        }

        return $updates;
    }
499990
public function getQueryStringAsArray()
    {
        $queryString = $this->getQueryString();

        if ('' === $queryString) {
            return [];
        }

        $queryStringArray = [];
        parse_str($queryString, $queryStringArray);

        return $queryStringArray;
    }