Development > PHP Information protected function generate() : void { $this->h1 = 'PHP Information'; array_unshift($this->title, $this->h1); $this->lvTabs = new Tabs(['parent' => "\$\$WH.ge('tabs-generic')"]); parent::generate(); $this->addScript([SC_CSS_STRING, << $b) { ob_start(); phpinfo($b); $buff = ob_get_contents(); ob_end_clean(); $buff = explode('
', $buff)[1]; $buff = explode('
', $buff); array_pop($buff); // remove last from stack $buff = implode('', $buff); // sew it together if (strpos($buff, '

')) $buff = explode('

', $buff)[1]; if (strpos($buff, '

')) { $parts = explode('

', $buff); foreach ($parts as $p) { if (!preg_match('/\w/i', $p)) continue; $p = explode('

', $p); $name = $names[$i] ? $names[$i].': ' : ''; if (preg_match('/]*>([\w\s\d]+)<\/a>/i', $p[0], $m)) $name .= $m[1]; else $name .= $p[0]; $this->lvTabs->addDataTab(strtolower(strtr($name, [' ' => ''])), $name, $p[1]); } } else $this->lvTabs->addDataTab(strtolower($names[$i]), $names[$i], $buff); } } } ?>