3v4l.org

run code in 300+ PHP versions simultaneously
<?php if(!defined('E_DEPRECATED')){ define('E_DEPRECATED', 0); } if(!defined('E_USER_DEPRECATED')){ define('E_USER_DEPRECATED', 0); } const EHS_ERRORS = array( E_ERROR => array('ERROR', 'Error'), E_WARNING => array('WARNING', 'Warning'), E_PARSE => array('PARSE', 'Parsing Error'), E_NOTICE => array('NOTICE', 'Notice'), E_CORE_ERROR => array('CORE_ERROR', 'Core Error'), E_CORE_WARNING => array('CORE_WARNING', 'Core Warning'), E_COMPILE_ERROR => array('COMPILE_ERROR', 'Compile Error'), E_COMPILE_WARNING => array('COMPILE_WARNING', 'Compile Warning'), E_USER_ERROR => array('USER_ERROR', 'Triggered Error'), E_USER_WARNING => array('USER_WARNING', 'Triggered Warning'), E_USER_NOTICE => array('USER_NOTICE', 'Triggered Notice'), E_STRICT => array('STRICT', 'Strict Standarts'), E_RECOVERABLE_ERROR => array('RECOVERABLE_ERROR', 'Catchable Fatal Error'), E_DEPRECATED => array('DEPRECATED', 'Deprecated'), E_USER_DEPRECATED => array('USER_DEPRECATED', 'Triggered Deprecated') ); define('EHS_CHECK_TOKENS_RGX', "/\(T_(".implode('|', array_keys(EHS_TOKENS)).")\)/"); define('EHS_NL', "<br>"); define('EHS_OPEN', "<div style='padding:1px;margin:1px 0;white-space:pre-wrap;border:1px solid black;word-wrap:break-word;'>"); define('EHS_SOURCE_OPEN', "<div style='padding:1px;margin:1px 0 0;white-space:pre-wrap;border:1px solid black;word-wrap:break-word;tab-size:2;font-family:monospace;'>"); define('EHS_CLOSE', "</div>"); define('EHS_OFF', 1); define('EHS_GET_BACKTRACE', 2); define('EHS_GET_SOURCE', 4); define('EHS_GET_TOKEN_EXAMPLE',8); define('EHS_GET_TOKEN_INFO', 16); define('EHS_GET_MEMORY_USAGE', 32); define('EHS_DEBUG', 64); define('EHS_MUST_IGNORE_REPORTING', 128); define('EHS_ALL', (4096 - 1) ^ EHS_OFF); define('EHS_UTF', (extension_loaded('mbstring') ? (ini_get('mbstring.internal_encoding') == 'UTF-8') : false)); class EHS { public static $previousAssertOptions = array(); public static $instance = null; public $maxchars = 30; public $linkFormat = ''; public $mask = 0; public function __construct($mask = EHS_OFF){ if(self::$instance != null){ throw new Exception('EHS Object already exists, check EHS::$instance'); } $this->mask = $mask; self::$instance = &$this; } public function reporting($E = null){ if($E === null){ return error_reporting(); }else{ error_reporting($E); } return $this; } public function displayAllErrors(){ $this->reporting(E_ALL | E_STRICT); ini_set('display_errors', 1); ini_set('display_startup_errors', 1); return $this; } public function setup($error = false, $fatal = false, $exception = false, $assert = false){ if($error){ set_error_handler(array($this, 'ErrorHandler')); } if($fatal){ register_shutdown_function(array($this, 'FatalErrorHandler')); ob_start(); } if($exception){ set_exception_handler(array($this, 'ExceptionHandler')); } if($assert){ self::$previousAssertOptions[ASSERT_ACTIVE] = assert_options(ASSERT_ACTIVE); self::$previousAssertOptions[ASSERT_WARNING] = assert_options(ASSERT_ACTIVE); self::$previousAssertOptions[ASSERT_BAIL] = assert_options(ASSERT_BAIL); self::$previousAssertOptions[ASSERT_QUIET_EVAL] = assert_options(ASSERT_QUIET_EVAL); self::$previousAssertOptions[ASSERT_CALLBACK] = assert_options(ASSERT_CALLBACK); assert_options(ASSERT_ACTIVE, 1); assert_options(ASSERT_WARNING, 0); assert_options(ASSERT_BAIL, 0); assert_options(ASSERT_QUIET_EVAL, 0); assert_options(ASSERT_CALLBACK, array($this, 'AssertionHandler')); } return $this; } public function setupEnvironment(){ ini_set('html_errors', 'On'); ini_set('docref_root', ''); ini_set('docref_ext', ''); ini_set('log_errors', 'On'); ini_set('log_errors_max_len', 0); ini_set('ignore_repeated_errors', 'Off'); ini_set('ignore_repeated_source', 'Off'); ini_set('report_memleaks', 'Off'); ini_set('track_errors', 'On'); ini_set('xmlrpc_errors', 'Off'); ini_set('xmlrpc_error_number', 'Off'); ini_set('error_prepend_string', ''); ini_set('error_append_string', ''); return $this; } public function restore($error = false, $exception = false, $assert = false){ if($error){ restore_error_handler(); } if($exception){ restore_exception_handler(); } if($assert){ assert_options(ASSERT_ACTIVE, self::$previousAssertOptions[ASSERT_ACTIVE]); assert_options(ASSERT_WARNING, self::$previousAssertOptions[ASSERT_WARNING]); assert_options(ASSERT_BAIL, self::$previousAssertOptions[ASSERT_BAIL]); assert_options(ASSERT_QUIET_EVAL, self::$previousAssertOptions[ASSERT_QUIET_EVAL]); assert_options(ASSERT_CALLBACK, self::$previousAssertOptions[ASSERT_CALLBACK]); } return $this; } public function ErrorHandler($code, $message, $file, $line, $context = INF){ if(($this->mask & EHS_OFF) || ($ignored = $this->ignoreReporting($code)) == 'X'){ return false; }else{ $debug = ($this->mask & EHS_DEBUG) || !($code & (E_NOTICE | E_USER_NOTICE | E_DEPRECATED | E_USER_DEPRECATED | E_STRICT)); $types = EHS_ERRORS[$code]; $text = EHS_OPEN; $text .= "<b>[".date('d-M-Y H:i:s')."] $ignored [E_$types[0]]".(($this->mask & EHS_GET_MEMORY_USAGE) && $debug ? ' [Memory Usage: '.memory_get_usage().' Bytes]' : '')."</b>".EHS_NL; $text .= "<b>$types[1]:</b> {$message}".EHS_NL; $text .= " in <b>[{$this->formatLink($file, $line)}]</b>".EHS_NL; if($debug){ $text .= $this->getErrorSourceCode($file, $line); if($this->mask & EHS_GET_BACKTRACE){ $text .= $this->formatBacktrace($this->backtrace(), $context === INF ? 3 : 2); } } echo $text.EHS_CLOSE; return true; } } public function FatalErrorHandler(){ $error = error_get_last(); if($error && $error['type'] & (E_ERROR | E_PARSE | E_COMPILE_ERROR | E_CORE_ERROR)){ while(ob_get_level()){ ob_end_clean(); } $this->ErrorHandler($error['type'], $error['message'], $error['file'], $error['line']); exit; }else{ ob_end_flush(); } } public function ExceptionHandler($e){ $hasChain = !!$e->getPrevious(); $text = ($hasChain ? EHS_OPEN : ''); $date = date('d-M-Y H:i:s'); do{ if($e instanceof ErrorException){ $text .= $this->ErrorException($e, $date); }else{ $text .= $this->Exception($e, $date); } }while($e = $e->getPrevious()); $text .= ($hasChain ? EHS_CLOSE : ''); echo $text; } protected function ErrorException($e, $date){ $code = $e->getCode(); $file = $e->getFile(); $line = $e->getLine(); $severity = $e->getSeverity(); $types = EHS_ERRORS[$severity] ?: array('UNKNOWN', 'Unknown'); $text = EHS_OPEN; $text .= "<b>[$date] [E_$types[0]]".($code ? " [Code: $code]" : '')."</b>".EHS_NL; $text .= "<b>$types[1] Exception:</b> {$e->getMessage()}".EHS_NL; $text .= " thrown in <b>[{$this->formatLink($file, $line)}]</b>".EHS_NL; $text .= $this->getErrorSourceCode($file, $line); $text .= $this->formatBacktrace($e->getTrace()); $text .= EHS_CLOSE; return $text; } protected function Exception($e, $date){ $code = $e->getCode(); $file = $e->getFile(); $line = $e->getLine(); $text = EHS_OPEN; $text .= "<b>[$date]".($code ? " [Code: $code]" : '')."</b>".EHS_NL; $text .= "<b>".get_class($e).":</b> {$e->getMessage()}".EHS_NL; $text .= " thrown in <b>[{$this->formatLink($file, $line)}]</b>".EHS_NL; $text .= $this->getErrorSourceCode($file, $line); $text .= $this->formatBacktrace($e->getTrace()); $text .= EHS_CLOSE; return $text; } public function AssertionHandler($file, $line, $code, $message = ''){ $text = EHS_OPEN; $text .= "<b>[".date('d-M-Y H:i:s')."]</b>".EHS_NL; $text .= "<b>Assertion Failed:</b> $message".($code ? " ($code)" : '').EHS_NL; $text .= " in <b>[{$this->formatLink($file, $line)}]</b>".EHS_NL; echo $text.EHS_CLOSE; return true; } protected function formatBacktrace($trace, $init = 0){ $length = count($trace); if($length > $init){ $text = EHS_SOURCE_OPEN.'Trace:'; for($i = $init; $i < $length; $i++){ $point = $trace[$i]; $text .= EHS_NL.' \–––> '; $args = isset($point['args']) ? $this->formatArgs($point['args']) : '()'; $text .= isset($point['class']) ? $point['class'] : ''; $text .= isset($point['type']) ? $point['type'] : ''; $text .= isset($point['function']) ? $point['function'].$args : '???'; $text .= EHS_NL.' at ['.(isset($point['file']) ? $this->formatLink($point['file'], (isset($point['line']) ? $point['line'] : 0)) : 'unknown').']'; } unset($trace); return $text.EHS_CLOSE; }else{ return ''; } } protected function getErrorSourceCode($file, $line){ if(($this->mask & EHS_GET_SOURCE) && $file && $line && ($lines = file($file)) !== false){ $max_length = $this->stringLength((string) ($line + 1)); $compile = function($num, $line) use ($max_length){ $out = $num.str_repeat(' ', $max_length - $this->stringLength((string) $num))." | ".htmlspecialchars($line); return $out; }; $text = EHS_SOURCE_OPEN; $text .= ($lines[$line - 2] ? $compile($line - 1, $lines[$line - 2]) : ''); $text .= "<font style='display:block;background:rgba(255, 165, 165, 0.3);'>".$compile($line, $lines[$line - 1])."</font>"; $text .= ($lines[$line] ? $compile($line + 1, $lines[$line]) : ''); return $text.EHS_CLOSE; }else{ return ''; } } protected function ignoreReporting($code){ if(!(error_reporting() & $code)){ if($this->mask & EHS_MUST_IGNORE_REPORTING){ return '@'; }else{ return 'X'; } } return ''; } protected function formatLink($file, $line){ if(!$file || !$this->linkFormat){ return "{$this->shortFile($file)}:$line"; } return "<a href='".str_replace(array('%f', '%l'), array(urlencode($file), $line), $this->linkFormat)."' style='color:black;'>{$this->shortFile($file)}:$line</a>"; } protected function shortFile($file){ return str_replace($_SERVER['DOCUMENT_ROOT'], '', str_replace('\\', '/', $file)); } protected function backtrace(){ if(defined('DEBUG_BACKTRACE_PROVIDE_OBJECT')){ return debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT); }else{ return debug_backtrace(true); } } protected function formatString($str){ if($this->stringLength($str) > $this->maxchars){ if(EHS_UTF){ $str = trim(mb_substr($str, 0, $this->maxchars / 2)).'…'.trim(mb_substr($str, -$this->maxchars / 2)); }else{ $str = substr($str, 0, $this->maxchars / 2).'...'.substr($str, -$this->maxchars / 2); } } return $str; } protected function stringLength($str){ if(EHS_UTF){ $strlen = mb_strlen($str); }else{ $strlen = strlen($str); } return $strlen; } protected function formatArg($arg){ switch(gettype($arg)){ case 'boolean': return $arg ? 'true' : 'false'; case 'NULL': return 'null'; case 'integer': case 'double': case 'float': $arg = (string) $arg; if(EHS_UTF){ $arg = str_replace('INF', '∞', $arg); }else{ $arg = str_replace('INF', 'Infinity', $arg); } $arg = str_replace('NAN', 'NaN', $arg); return $arg; case 'string': if(is_callable($arg, false, $name)){ return "fs:$name"; }else if(class_exists($arg, false)){ return "c:$arg"; }else if(interface_exists($arg, false)){ return "i:$arg"; }else if(function_exists('trait_exists') && trait_exists($arg, false)){ return "t:$arg"; }else{ $strlen = $this->stringLength($arg); $arg = $this->formatString($arg); if($strlen <= $this->maxchars){ $arg = "\"$arg\""; }else{ $arg = "\"$arg\"($strlen)"; } return str_replace("\n", '\n', str_replace("\t", '\t', $arg)); } case 'array': if(is_callable($arg, false, $name)){ return "fa:$name"; }else{ return 'array('.count($arg).')'; } case 'object': $object = get_class($arg).'():'.spl_object_hash($arg); if(is_callable($arg, false)){ $object = "fo:".$object; } return $object; case 'resource': return 'r:'.get_resource_type($arg); default: return 'unknown'; } } protected function formatArgs($args){ foreach($args as &$value){ $value = $this->formatArg($value); } return '('.implode(', ', $args).')'; } } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 1, Position 2 = 5
Branch analysis from position: 1
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 85, Position 2 = 91
Branch analysis from position: 85
1 jumps found. (Code = 42) Position 1 = 92
Branch analysis from position: 92
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 91
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
Branch analysis from position: 5
filename:       /in/spe7i
function name:  (null)
number of ops:  95
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E > > JMPZ                                                     <false>, ->5
    3     1    >   INIT_FCALL                                               'define'
          2        SEND_VAL                                                 'E_DEPRECATED'
          3        SEND_VAL                                                 0
          4        DO_ICALL                                                 
    5     5    > > JMPZ                                                     <false>, ->10
    6     6    >   INIT_FCALL                                               'define'
          7        SEND_VAL                                                 'E_USER_DEPRECATED'
          8        SEND_VAL                                                 0
          9        DO_ICALL                                                 
    9    10    >   DECLARE_CONST                                            'EHS_ERRORS', <array>
   26    11        INIT_FCALL                                               'define'
         12        SEND_VAL                                                 'EHS_CHECK_TOKENS_RGX'
         13        INIT_FCALL                                               'implode'
         14        SEND_VAL                                                 '%7C'
         15        INIT_FCALL                                               'array_keys'
         16        FETCH_CONSTANT                                   ~2      'EHS_TOKENS'
         17        SEND_VAL                                                 ~2
         18        DO_ICALL                                         $3      
         19        SEND_VAR                                                 $3
         20        DO_ICALL                                         $4      
         21        CONCAT                                           ~5      '%2F%5C%28T_%28', $4
         22        CONCAT                                           ~6      ~5, '%29%5C%29%2F'
         23        SEND_VAL                                                 ~6
         24        DO_ICALL                                                 
   27    25        INIT_FCALL                                               'define'
         26        SEND_VAL                                                 'EHS_NL'
         27        SEND_VAL                                                 '%3Cbr%3E'
         28        DO_ICALL                                                 
   28    29        INIT_FCALL                                               'define'
         30        SEND_VAL                                                 'EHS_OPEN'
         31        SEND_VAL                                                 '%3Cdiv+style%3D%27padding%3A1px%3Bmargin%3A1px+0%3Bwhite-space%3Apre-wrap%3Bborder%3A1px+solid+black%3Bword-wrap%3Abreak-word%3B%27%3E'
         32        DO_ICALL                                                 
   29    33        INIT_FCALL                                               'define'
         34        SEND_VAL                                                 'EHS_SOURCE_OPEN'
         35        SEND_VAL                                                 '%3Cdiv+style%3D%27padding%3A1px%3Bmargin%3A1px+0+0%3Bwhite-space%3Apre-wrap%3Bborder%3A1px+solid+black%3Bword-wrap%3Abreak-word%3Btab-size%3A2%3Bfont-family%3Amonospace%3B%27%3E'
         36        DO_ICALL                                                 
   30    37        INIT_FCALL                                               'define'
         38        SEND_VAL                                                 'EHS_CLOSE'
         39        SEND_VAL                                                 '%3C%2Fdiv%3E'
         40        DO_ICALL                                                 
   32    41        INIT_FCALL                                               'define'
         42        SEND_VAL                                                 'EHS_OFF'
         43        SEND_VAL                                                 1
         44        DO_ICALL                                                 
   33    45        INIT_FCALL                                               'define'
         46        SEND_VAL                                                 'EHS_GET_BACKTRACE'
         47        SEND_VAL                                                 2
         48        DO_ICALL                                                 
   34    49        INIT_FCALL                                               'define'
         50        SEND_VAL                                                 'EHS_GET_SOURCE'
         51        SEND_VAL                                                 4
         52        DO_ICALL                                                 
   35    53        INIT_FCALL                                               'define'
         54        SEND_VAL                                                 'EHS_GET_TOKEN_EXAMPLE'
         55        SEND_VAL                                                 8
         56        DO_ICALL                                                 
   36    57        INIT_FCALL                                               'define'
         58        SEND_VAL                                                 'EHS_GET_TOKEN_INFO'
         59        SEND_VAL                                                 16
         60        DO_ICALL                                                 
   37    61        INIT_FCALL                                               'define'
         62        SEND_VAL                                                 'EHS_GET_MEMORY_USAGE'
         63        SEND_VAL                                                 32
         64        DO_ICALL                                                 
   38    65        INIT_FCALL                                               'define'
         66        SEND_VAL                                                 'EHS_DEBUG'
         67        SEND_VAL                                                 64
         68        DO_ICALL                                                 
   39    69        INIT_FCALL                                               'define'
         70        SEND_VAL                                                 'EHS_MUST_IGNORE_REPORTING'
         71        SEND_VAL                                                 128
         72        DO_ICALL                                                 
   40    73        INIT_FCALL                                               'define'
         74        SEND_VAL                                                 'EHS_ALL'
         75        FETCH_CONSTANT                                   ~20     'EHS_OFF'
         76        BW_XOR                                           ~21     ~20, 4095
         77        SEND_VAL                                                 ~21
         78        DO_ICALL                                                 
   41    79        INIT_FCALL                                               'define'
         80        SEND_VAL                                                 'EHS_UTF'
         81        INIT_FCALL                                               'extension_loaded'
         82        SEND_VAL                                                 'mbstring'
         83        DO_ICALL                                         $23     
         84      > JMPZ                                                     $23, ->91
         85    >   INIT_FCALL                                               'ini_get'
         86        SEND_VAL                                                 'mbstring.internal_encoding'
         87        DO_ICALL                                         $24     
         88        IS_EQUAL                                         ~25     $24, 'UTF-8'
         89        QM_ASSIGN                                        ~26     ~25
         90      > JMP                                                      ->92
         91    >   QM_ASSIGN                                        ~26     <false>
         92    >   SEND_VAL                                                 ~26
         93        DO_ICALL                                                 
  357    94      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2Fspe7i%3A237%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/spe7i
function name:  {closure}
number of ops:  22
compiled vars:  !0 = $num, !1 = $line, !2 = $max_length, !3 = $out
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  237     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        BIND_STATIC                                              !2
  238     3        INIT_FCALL                                               'str_repeat'
          4        SEND_VAL                                                 '+'
          5        FETCH_THIS                                       $4      
          6        INIT_METHOD_CALL                                         $4, 'stringLength'
          7        CAST                                          6  ~5      !0
          8        SEND_VAL_EX                                              ~5
          9        DO_FCALL                                      0  $6      
         10        SUB                                              ~7      !2, $6
         11        SEND_VAL                                                 ~7
         12        DO_ICALL                                         $8      
         13        CONCAT                                           ~9      !0, $8
         14        CONCAT                                           ~10     ~9, '+%7C+'
         15        INIT_FCALL                                               'htmlspecialchars'
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                         $11     
         18        CONCAT                                           ~12     ~10, $11
         19        ASSIGN                                                   !3, ~12
  239    20      > RETURN                                                   !3
  240    21*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Fspe7i%3A237%240

Class EHS:
Function __construct:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/spe7i
function name:  __construct
number of ops:  15
compiled vars:  !0 = $mask
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   49     0  E >   RECV_INIT                                        !0      <const ast>
   50     1        FETCH_STATIC_PROP_R          unknown             ~1      'instance'
          2        IS_NOT_EQUAL                                             ~1, null
          3      > JMPZ                                                     ~2, ->8
   51     4    >   NEW                                              $3      'Exception'
          5        SEND_VAL_EX                                              'EHS+Object+already+exists%2C+check+EHS%3A%3A%24instance'
          6        DO_FCALL                                      0          
          7      > THROW                                         0          $3
   53     8    >   ASSIGN_OBJ                                               'mask'
          9        OP_DATA                                                  !0
   54    10        FETCH_THIS                                       $7      
         11        MAKE_REF                                         $8      $7
         12        ASSIGN_STATIC_PROP_REF                                   'instance'
         13        OP_DATA                                                  $8
   55    14      > RETURN                                                   null

End of function __construct

Function reporting:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 7
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/spe7i
function name:  reporting
number of ops:  13
compiled vars:  !0 = $E
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   56     0  E >   RECV_INIT                                        !0      null
   57     1        TYPE_CHECK                                    2          !0
          2      > JMPZ                                                     ~1, ->7
   58     3    >   INIT_FCALL                                               'error_reporting'
          4        DO_ICALL                                         $2      
          5      > RETURN                                                   $2
          6*       JMP                                                      ->10
   60     7    >   INIT_FCALL                                               'error_reporting'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
   62    10        FETCH_THIS                                       ~4      
         11      > RETURN                                                   ~4
   63    12*     > RETURN                                                   null

End of function reporting

Function displayallerrors:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/spe7i
function name:  displayAllErrors
number of ops:  14
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   65     0  E >   INIT_METHOD_CALL                                         'reporting'
          1        SEND_VAL_EX                                              32767
          2        DO_FCALL                                      0          
   66     3        INIT_FCALL                                               'ini_set'
          4        SEND_VAL                                                 'display_errors'
          5        SEND_VAL                                                 1
          6        DO_ICALL                                                 
   67     7        INIT_FCALL                                               'ini_set'
          8        SEND_VAL                                                 'display_startup_errors'
          9        SEND_VAL                                                 1
         10        DO_ICALL                                                 
   68    11        FETCH_THIS                                       ~3      
         12      > RETURN                                                   ~3
   69    13*     > RETURN                                                   null

End of function displayallerrors

Function setup:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 11
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 20
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 27
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 84
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 84
Branch analysis from position: 27
Branch analysis from position: 20
Branch analysis from position: 11
filename:       /in/spe7i
function name:  setup
number of ops:  87
compiled vars:  !0 = $error, !1 = $fatal, !2 = $exception, !3 = $assert
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   70     0  E >   RECV_INIT                                        !0      <false>
          1        RECV_INIT                                        !1      <false>
          2        RECV_INIT                                        !2      <false>
          3        RECV_INIT                                        !3      <false>
   71     4      > JMPZ                                                     !0, ->11
   72     5    >   INIT_FCALL                                               'set_error_handler'
          6        FETCH_THIS                                       ~4      
          7        INIT_ARRAY                                       ~5      ~4
          8        ADD_ARRAY_ELEMENT                                ~5      'ErrorHandler'
          9        SEND_VAL                                                 ~5
         10        DO_ICALL                                                 
   74    11    > > JMPZ                                                     !1, ->20
   75    12    >   INIT_FCALL                                               'register_shutdown_function'
         13        FETCH_THIS                                       ~7      
         14        INIT_ARRAY                                       ~8      ~7
         15        ADD_ARRAY_ELEMENT                                ~8      'FatalErrorHandler'
         16        SEND_VAL                                                 ~8
         17        DO_ICALL                                                 
   76    18        INIT_FCALL                                               'ob_start'
         19        DO_ICALL                                                 
   78    20    > > JMPZ                                                     !2, ->27
   79    21    >   INIT_FCALL                                               'set_exception_handler'
         22        FETCH_THIS                                       ~11     
         23        INIT_ARRAY                                       ~12     ~11
         24        ADD_ARRAY_ELEMENT                                ~12     'ExceptionHandler'
         25        SEND_VAL                                                 ~12
         26        DO_ICALL                                                 
   81    27    > > JMPZ                                                     !3, ->84
   82    28    >   INIT_FCALL                                               'assert_options'
         29        SEND_VAL                                                 1
         30        DO_ICALL                                         $16     
         31        FETCH_STATIC_PROP_W          unknown             $14     'previousAssertOptions'
         32        ASSIGN_DIM                                               $14, 1
         33        OP_DATA                                                  $16
   83    34        INIT_FCALL                                               'assert_options'
         35        SEND_VAL                                                 1
         36        DO_ICALL                                         $19     
         37        FETCH_STATIC_PROP_W          unknown             $17     'previousAssertOptions'
         38        ASSIGN_DIM                                               $17, 4
         39        OP_DATA                                                  $19
   84    40        INIT_FCALL                                               'assert_options'
         41        SEND_VAL                                                 3
         42        DO_ICALL                                         $22     
         43        FETCH_STATIC_PROP_W          unknown             $20     'previousAssertOptions'
         44        ASSIGN_DIM                                               $20, 3
         45        OP_DATA                                                  $22
   85    46        FETCH_CONSTANT                                   ~24     'ASSERT_QUIET_EVAL'
         47        INIT_FCALL                                               'assert_options'
         48        FETCH_CONSTANT                                   ~26     'ASSERT_QUIET_EVAL'
         49        SEND_VAL                                                 ~26
         50        DO_ICALL                                         $27     
         51        FETCH_STATIC_PROP_W          unknown             $23     'previousAssertOptions'
         52        ASSIGN_DIM                                               $23, ~24
         53        OP_DATA                                                  $27
   86    54        INIT_FCALL                                               'assert_options'
         55        SEND_VAL                                                 2
         56        DO_ICALL                                         $30     
         57        FETCH_STATIC_PROP_W          unknown             $28     'previousAssertOptions'
         58        ASSIGN_DIM                                               $28, 2
         59        OP_DATA                                                  $30
   87    60        INIT_FCALL                                               'assert_options'
         61        SEND_VAL                                                 1
         62        SEND_VAL                                                 1
         63        DO_ICALL                                                 
   88    64        INIT_FCALL                                               'assert_options'
         65        SEND_VAL                                                 4
         66        SEND_VAL                                                 0
         67        DO_ICALL                                                 
   89    68        INIT_FCALL                                               'assert_options'
         69        SEND_VAL                                                 3
         70        SEND_VAL                                                 0
         71        DO_ICALL                                                 
   90    72        INIT_FCALL                                               'assert_options'
         73        FETCH_CONSTANT                                   ~34     'ASSERT_QUIET_EVAL'
         74        SEND_VAL                                                 ~34
         75        SEND_VAL                                                 0
         76        DO_ICALL                                                 
   91    77        INIT_FCALL                                               'assert_options'
         78        SEND_VAL                                                 2
         79        FETCH_THIS                                       ~36     
         80        INIT_ARRAY                                       ~37     ~36
         81        ADD_ARRAY_ELEMENT                                ~37     'AssertionHandler'
         82        SEND_VAL                                                 ~37
         83        DO_ICALL                                                 
   93    84    >   FETCH_THIS                                       ~39     
         85      > RETURN                                                   ~39
   94    86*     > RETURN                                                   null

End of function setup

Function setupenvironment:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/spe7i
function name:  setupEnvironment
number of ops:  55
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   96     0  E >   INIT_FCALL                                               'ini_set'
          1        SEND_VAL                                                 'html_errors'
          2        SEND_VAL                                                 'On'
          3        DO_ICALL                                                 
   97     4        INIT_FCALL                                               'ini_set'
          5        SEND_VAL                                                 'docref_root'
          6        SEND_VAL                                                 ''
          7        DO_ICALL                                                 
   98     8        INIT_FCALL                                               'ini_set'
          9        SEND_VAL                                                 'docref_ext'
         10        SEND_VAL                                                 ''
         11        DO_ICALL                                                 
  100    12        INIT_FCALL                                               'ini_set'
         13        SEND_VAL                                                 'log_errors'
         14        SEND_VAL                                                 'On'
         15        DO_ICALL                                                 
  101    16        INIT_FCALL                                               'ini_set'
         17        SEND_VAL                                                 'log_errors_max_len'
         18        SEND_VAL                                                 0
         19        DO_ICALL                                                 
  102    20        INIT_FCALL                                               'ini_set'
         21        SEND_VAL                                                 'ignore_repeated_errors'
         22        SEND_VAL                                                 'Off'
         23        DO_ICALL                                                 
  103    24        INIT_FCALL                                               'ini_set'
         25        SEND_VAL                                                 'ignore_repeated_source'
         26        SEND_VAL                                                 'Off'
         27        DO_ICALL                                                 
  104    28        INIT_FCALL                                               'ini_set'
         29        SEND_VAL                                                 'report_memleaks'
         30        SEND_VAL                                                 'Off'
         31        DO_ICALL                                                 
  105    32        INIT_FCALL                                               'ini_set'
         33        SEND_VAL                                                 'track_errors'
         34        SEND_VAL                                                 'On'
         35        DO_ICALL                                                 
  106    36        INIT_FCALL                                               'ini_set'
         37        SEND_VAL                                                 'xmlrpc_errors'
         38        SEND_VAL                                                 'Off'
         39        DO_ICALL                                                 
  107    40        INIT_FCALL                                               'ini_set'
         41        SEND_VAL                                                 'xmlrpc_error_number'
         42        SEND_VAL                                                 'Off'
         43        DO_ICALL                                                 
  108    44        INIT_FCALL                                               'ini_set'
         45        SEND_VAL                                                 'error_prepend_string'
         46        SEND_VAL                                                 ''
         47        DO_ICALL                                                 
  109    48        INIT_FCALL                                               'ini_set'
         49        SEND_VAL                                                 'error_append_string'
         50        SEND_VAL                                                 ''
         51        DO_ICALL                                                 
  110    52        FETCH_THIS                                       ~13     
         53      > RETURN                                                   ~13
  111    54*     > RETURN                                                   null

End of function setupenvironment

Function restore:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 42
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 42
Branch analysis from position: 9
Branch analysis from position: 6
filename:       /in/spe7i
function name:  restore
number of ops:  45
compiled vars:  !0 = $error, !1 = $exception, !2 = $assert
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  112     0  E >   RECV_INIT                                        !0      <false>
          1        RECV_INIT                                        !1      <false>
          2        RECV_INIT                                        !2      <false>
  113     3      > JMPZ                                                     !0, ->6
  114     4    >   INIT_FCALL                                               'restore_error_handler'
          5        DO_ICALL                                                 
  116     6    > > JMPZ                                                     !1, ->9
  117     7    >   INIT_FCALL                                               'restore_exception_handler'
          8        DO_ICALL                                                 
  119     9    > > JMPZ                                                     !2, ->42
  120    10    >   INIT_FCALL                                               'assert_options'
         11        SEND_VAL                                                 1
         12        FETCH_STATIC_PROP_R          unknown             ~5      'previousAssertOptions'
         13        FETCH_DIM_R                                      ~6      ~5, 1
         14        SEND_VAL                                                 ~6
         15        DO_ICALL                                                 
  121    16        INIT_FCALL                                               'assert_options'
         17        SEND_VAL                                                 4
         18        FETCH_STATIC_PROP_R          unknown             ~8      'previousAssertOptions'
         19        FETCH_DIM_R                                      ~9      ~8, 4
         20        SEND_VAL                                                 ~9
         21        DO_ICALL                                                 
  122    22        INIT_FCALL                                               'assert_options'
         23        SEND_VAL                                                 3
       

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
187.98 ms | 1428 KiB | 45 Q