/** * Format error as a pseudo-element in CSS * * @param \Exception $error * * @return string */ protected function createErrorCSS($error) { $message = str_replace(array("'", "\n"), array("\\'", "\\A"), $error->getfile() . ":\n\n" . $error->getMessage()); return "body { display: none !important; }\n html:after {\n background: white;\n color: black;\n content: '{$message}';\n display: block !important;\n font-family: mono;\n padding: 1em;\n white-space: pre;\n }"; }
<?php $x = new Exception(); $x->gettraceasstring(1); $x->gettraceasstring(); $x->__tostring(1); $x->gettrace(1); $x->getline(1); $x->getfile(1); $x->getmessage(1); $x->getcode(1);