3v4l.org

run code in 300+ PHP versions simultaneously
<?php header('Content-Type: text/plain'); //print_r($_SERVER); function on_shutdown(){ echo "<!--\n"; echo "\n\tTime Taken:"; echo "\n\t\t".number_format(microtime(true) - PM_INIT_TIME, 8)."s"; echo "\n\tHeaders Sent:"; $file = $line = null; headers_sent($file, $line); echo "\n\t\t$file: $line"; echo "\n\tLast Error:"; if(function_exists('error_get_last') && error_get_last()) foreach(error_get_last() as $k=>$v) echo "\n\t\t$k: $v"; elseif($php_errormsg) echo "\n\t\tError: $php_errormsg"; else echo "\n\t\tnone"; echo "\n\tIncluded Files:"; echo "\n\t\t".implode("\n\t\t", get_included_files()); echo "\n-->"; } define('PM_INIT_TIME', microtime(true)); register_shutdown_function('on_shutdown'); while(ob_get_level())ob_end_flush(); ob_implicit_flush(true); $a = 100; $b = 3; for($i=0; $i<999999; $i++)$c = $a / $b; /*$dir = $_SERVER['SCRIPT_FILENAME']; while($dir = rtrim(dirname($dir), '/')){ echo $dir.PHP_EOL; foreach(glob($dir.'/*') as $file)echo chr(9).$file.PHP_EOL; }*/ ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 14
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
2 jumps found. (Code = 44) Position 1 = 31, Position 2 = 26
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
2 jumps found. (Code = 44) Position 1 = 31, Position 2 = 26
Branch analysis from position: 31
Branch analysis from position: 26
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 14
Branch analysis from position: 19
Branch analysis from position: 14
filename:       /in/E34cR
function name:  (null)
number of ops:  32
compiled vars:  !0 = $a, !1 = $b, !2 = $i, !3 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'header'
          1        SEND_VAL                                                 'Content-Type%3A+text%2Fplain'
          2        DO_ICALL                                                 
   25     3        INIT_FCALL                                               'define'
          4        SEND_VAL                                                 'PM_INIT_TIME'
          5        INIT_FCALL                                               'microtime'
          6        SEND_VAL                                                 <true>
          7        DO_ICALL                                         $5      
          8        SEND_VAR                                                 $5
          9        DO_ICALL                                                 
   26    10        INIT_FCALL                                               'register_shutdown_function'
         11        SEND_VAL                                                 'on_shutdown'
         12        DO_ICALL                                                 
   27    13      > JMP                                                      ->16
         14    >   INIT_FCALL                                               'ob_end_flush'
         15        DO_ICALL                                                 
         16    >   INIT_FCALL                                               'ob_get_level'
         17        DO_ICALL                                         $9      
         18      > JMPNZ                                                    $9, ->14
   28    19    >   INIT_FCALL                                               'ob_implicit_flush'
         20        SEND_VAL                                                 <true>
         21        DO_ICALL                                                 
   31    22        ASSIGN                                                   !0, 100
         23        ASSIGN                                                   !1, 3
   32    24        ASSIGN                                                   !2, 0
         25      > JMP                                                      ->29
         26    >   DIV                                              ~14     !0, !1
         27        ASSIGN                                                   !3, ~14
         28        PRE_INC                                                  !2
         29    >   IS_SMALLER                                               !2, 999999
         30      > JMPNZ                                                    ~17, ->26
   40    31    > > RETURN                                                   1

Function on_shutdown:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 31, Position 2 = 34
Branch analysis from position: 31
2 jumps found. (Code = 43) Position 1 = 35, Position 2 = 48
Branch analysis from position: 35
2 jumps found. (Code = 77) Position 1 = 38, Position 2 = 46
Branch analysis from position: 38
2 jumps found. (Code = 78) Position 1 = 39, Position 2 = 46
Branch analysis from position: 39
1 jumps found. (Code = 42) Position 1 = 38
Branch analysis from position: 38
Branch analysis from position: 46
1 jumps found. (Code = 42) Position 1 = 54
Branch analysis from position: 54
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 46
Branch analysis from position: 48
2 jumps found. (Code = 43) Position 1 = 49, Position 2 = 53
Branch analysis from position: 49
1 jumps found. (Code = 42) Position 1 = 54
Branch analysis from position: 54
Branch analysis from position: 53
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
filename:       /in/E34cR
function name:  on_shutdown
number of ops:  65
compiled vars:  !0 = $file, !1 = $line, !2 = $v, !3 = $k, !4 = $php_errormsg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ECHO                                                     '%3C%21--%0A'
    8     1        ECHO                                                     '%0A%09Time+Taken%3A'
    9     2        INIT_FCALL                                               'number_format'
          3        INIT_FCALL                                               'microtime'
          4        SEND_VAL                                                 <true>
          5        DO_ICALL                                         $5      
          6        FETCH_CONSTANT                                   ~6      'PM_INIT_TIME'
          7        SUB                                              ~7      $5, ~6
          8        SEND_VAL                                                 ~7
          9        SEND_VAL                                                 8
         10        DO_ICALL                                         $8      
         11        CONCAT                                           ~9      '%0A%09%09', $8
         12        CONCAT                                           ~10     ~9, 's'
         13        ECHO                                                     ~10
   10    14        ECHO                                                     '%0A%09Headers+Sent%3A'
   11    15        ASSIGN                                           ~11     !1, null
         16        ASSIGN                                                   !0, ~11
   12    17        INIT_FCALL                                               'headers_sent'
         18        SEND_REF                                                 !0
         19        SEND_REF                                                 !1
         20        DO_ICALL                                                 
   13    21        ROPE_INIT                                     4  ~15     '%0A%09%09'
         22        ROPE_ADD                                      1  ~15     ~15, !0
         23        ROPE_ADD                                      2  ~15     ~15, '%3A+'
         24        ROPE_END                                      3  ~14     ~15, !1
         25        ECHO                                                     ~14
   14    26        ECHO                                                     '%0A%09Last+Error%3A'
   15    27        INIT_FCALL                                               'function_exists'
         28        SEND_VAL                                                 'error_get_last'
         29        DO_ICALL                                         $17     
         30      > JMPZ_EX                                          ~18     $17, ->34
         31    >   INIT_FCALL                                               'error_get_last'
         32        DO_ICALL                                         $19     
         33        BOOL                                             ~18     $19
         34    > > JMPZ                                                     ~18, ->48
   16    35    >   INIT_FCALL                                               'error_get_last'
         36        DO_ICALL                                         $20     
         37      > FE_RESET_R                                       $21     $20, ->46
         38    > > FE_FETCH_R                                       ~22     $21, !2, ->46
         39    >   ASSIGN                                                   !3, ~22
   17    40        ROPE_INIT                                     4  ~25     '%0A%09%09'
         41        ROPE_ADD                                      1  ~25     ~25, !3
         42        ROPE_ADD                                      2  ~25     ~25, '%3A+'
         43        ROPE_END                                      3  ~24     ~25, !2
         44        ECHO                                                     ~24
   16    45      > JMP                                                      ->38
         46    >   FE_FREE                                                  $21
         47      > JMP                                                      ->54
   18    48    > > JMPZ                                                     !4, ->53
   19    49    >   NOP                                                      
         50        FAST_CONCAT                                      ~27     '%0A%09%09Error%3A+', !4
         51        ECHO                                                     ~27
         52      > JMP                                                      ->54
   20    53    >   ECHO                                                     '%0A%09%09none'
   21    54    >   ECHO                                                     '%0A%09Included+Files%3A'
   22    55        INIT_FCALL                                               'implode'
         56        SEND_VAL                                                 '%0A%09%09'
         57        INIT_FCALL                                               'get_included_files'
         58        DO_ICALL                                         $28     
         59        SEND_VAR                                                 $28
         60        DO_ICALL                                         $29     
         61        CONCAT                                           ~30     '%0A%09%09', $29
         62        ECHO                                                     ~30
   23    63        ECHO                                                     '%0A--%3E'
   24    64      > RETURN                                                   null

End of function on_shutdown

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.3 ms | 1408 KiB | 39 Q