3v4l.org

run code in 300+ PHP versions simultaneously
<?php function ob_application_handler($buffer) { return application_text_process($buffer, true); } function application_text_process($text, $noBreak = false, $append = null, $skip = null) { global $application_config; $out = ' '.$text; if (null == $skip) { $skip = []; } $out = preg_replace( '/([^\w\.](<!--)?(PR|SCR|SPN|SIF|CN|MOWA|SNC|SE|DN|NC|JVS|EDR|Issue|SODF|IFI|ER|CHIT|AR|MOIST|PUI)(-->)?)([\s#]*(<br>)[\s#]*)/i', '$1 ', $out ); $patterns = $application_config->getAll('PREPARE'); foreach ($patterns as $row) { if (!empty($row[2]) && !in_array($row[2], $skip)) { $out = preg_replace_callback($row[0], eval($row[1]), $out); } } $patterns = $application_config->getAll('MATCH'); foreach ($patterns as $row) { list($pattern, $type, $number, $revision, $volume, $before) = $row; $out = preg_replace_callback($pattern, function ($m) use ($type, $number, $revision, $volume, $before) { $type = resolve_index($m, $type); $number = resolve_index($m, $number); $revision = resolve_index($m, $revision); $volume = resolve_index($m, $volume); $before = resolve_index($m, $before); return build_url($type, $number, $revision, $volume, $before); }, $out); } if (!is_null($append)) { $out = str_replace('<a href=', "<a $append href=", $out); } if (!$noBreak) { $out = nl2br($out); } $theContent = substr($out, 1); return $theContent; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/S9t6p
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   55     0  E > > RETURN                                                   1

Function ob_application_handler:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/S9t6p
function name:  ob_application_handler
number of ops:  7
compiled vars:  !0 = $buffer
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        INIT_FCALL_BY_NAME                                       'application_text_process'
          2        SEND_VAR_EX                                              !0
          3        SEND_VAL_EX                                              <true>
          4        DO_FCALL                                      0  $1      
          5      > RETURN                                                   $1
    6     6*     > RETURN                                                   null

End of function ob_application_handler

Function application_text_process:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 10
Branch analysis from position: 9
2 jumps found. (Code = 77) Position 1 = 21, Position 2 = 43
Branch analysis from position: 21
2 jumps found. (Code = 78) Position 1 = 22, Position 2 = 43
Branch analysis from position: 22
2 jumps found. (Code = 46) Position 1 = 25, Position 2 = 32
Branch analysis from position: 25
2 jumps found. (Code = 43) Position 1 = 33, Position 2 = 42
Branch analysis from position: 33
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
Branch analysis from position: 42
Branch analysis from position: 32
Branch analysis from position: 43
2 jumps found. (Code = 77) Position 1 = 49, Position 2 = 77
Branch analysis from position: 49
2 jumps found. (Code = 78) Position 1 = 50, Position 2 = 77
Branch analysis from position: 50
1 jumps found. (Code = 42) Position 1 = 49
Branch analysis from position: 49
Branch analysis from position: 77
2 jumps found. (Code = 43) Position 1 = 81, Position 2 = 90
Branch analysis from position: 81
2 jumps found. (Code = 43) Position 1 = 92, Position 2 = 96
Branch analysis from position: 92
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 96
Branch analysis from position: 90
Branch analysis from position: 77
Branch analysis from position: 43
Branch analysis from position: 10
filename:       /in/S9t6p
function name:  application_text_process
number of ops:  103
compiled vars:  !0 = $text, !1 = $noBreak, !2 = $append, !3 = $skip, !4 = $application_config, !5 = $out, !6 = $patterns, !7 = $row, !8 = $pattern, !9 = $type, !10 = $number, !11 = $revision, !12 = $volume, !13 = $before, !14 = $theContent
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      <false>
          2        RECV_INIT                                        !2      null
          3        RECV_INIT                                        !3      null
   11     4        BIND_GLOBAL                                              !4, 'application_config'
   12     5        CONCAT                                           ~15     '+', !0
          6        ASSIGN                                                   !5, ~15
   14     7        IS_EQUAL                                                 !3, null
          8      > JMPZ                                                     ~17, ->10
   15     9    >   ASSIGN                                                   !3, <array>
   17    10    >   INIT_FCALL                                               'preg_replace'
   18    11        SEND_VAL                                                 '%2F%28%5B%5E%5Cw%5C.%5D%28%3C%21--%29%3F%28PR%7CSCR%7CSPN%7CSIF%7CCN%7CMOWA%7CSNC%7CSE%7CDN%7CNC%7CJVS%7CEDR%7CIssue%7CSODF%7CIFI%7CER%7CCHIT%7CAR%7CMOIST%7CPUI%29%28--%3E%29%3F%29%28%5B%5Cs%23%5D%2A%28%3Cbr%3E%29%5B%5Cs%23%5D%2A%29%2Fi'
   19    12        SEND_VAL                                                 '%241+'
   20    13        SEND_VAR                                                 !5
   17    14        DO_ICALL                                         $19     
         15        ASSIGN                                                   !5, $19
   22    16        INIT_METHOD_CALL                                         !4, 'getAll'
         17        SEND_VAL_EX                                              'PREPARE'
         18        DO_FCALL                                      0  $21     
         19        ASSIGN                                                   !6, $21
   23    20      > FE_RESET_R                                       $23     !6, ->43
         21    > > FE_FETCH_R                                               $23, !7, ->43
   24    22    >   ISSET_ISEMPTY_DIM_OBJ                         1  ~24     !7, 2
         23        BOOL_NOT                                         ~25     ~24
         24      > JMPZ_EX                                          ~25     ~25, ->32
         25    >   INIT_FCALL                                               'in_array'
         26        FETCH_DIM_R                                      ~26     !7, 2
         27        SEND_VAL                                                 ~26
         28        SEND_VAR                                                 !3
         29        DO_ICALL                                         $27     
         30        BOOL_NOT                                         ~28     $27
         31        BOOL                                             ~25     ~28
         32    > > JMPZ                                                     ~25, ->42
   25    33    >   INIT_FCALL                                               'preg_replace_callback'
         34        FETCH_DIM_R                                      ~29     !7, 0
         35        SEND_VAL                                                 ~29
         36        FETCH_DIM_R                                      ~30     !7, 1
         37        INCLUDE_OR_EVAL                                  $31     ~30, EVAL
         38        SEND_VAR                                                 $31
         39        SEND_VAR                                                 !5
         40        DO_ICALL                                         $32     
         41        ASSIGN                                                   !5, $32
   23    42    > > JMP                                                      ->21
         43    >   FE_FREE                                                  $23
   29    44        INIT_METHOD_CALL                                         !4, 'getAll'
         45        SEND_VAL_EX                                              'MATCH'
         46        DO_FCALL                                      0  $34     
         47        ASSIGN                                                   !6, $34
   31    48      > FE_RESET_R                                       $36     !6, ->77
         49    > > FE_FETCH_R                                               $36, !7, ->77
   32    50    >   QM_ASSIGN                                        ~37     !7
         51        FETCH_LIST_R                                     $38     ~37, 0
         52        ASSIGN                                                   !8, $38
         53        FETCH_LIST_R                                     $40     ~37, 1
         54        ASSIGN                                                   !9, $40
         55        FETCH_LIST_R                                     $42     ~37, 2
         56        ASSIGN                                                   !10, $42
         57        FETCH_LIST_R                                     $44     ~37, 3
         58        ASSIGN                                                   !11, $44
         59        FETCH_LIST_R                                     $46     ~37, 4
         60        ASSIGN                                                   !12, $46
         61        FETCH_LIST_R                                     $48     ~37, 5
         62        ASSIGN                                                   !13, $48
         63        FREE                                                     ~37
   34    64        INIT_FCALL                                               'preg_replace_callback'
         65        SEND_VAR                                                 !8
         66        DECLARE_LAMBDA_FUNCTION                          ~50     [0]
         67        BIND_LEXICAL                                             ~50, !9
         68        BIND_LEXICAL                                             ~50, !10
         69        BIND_LEXICAL                                             ~50, !11
         70        BIND_LEXICAL                                             ~50, !12
         71        BIND_LEXICAL                                             ~50, !13
   42    72        SEND_VAL                                                 ~50
         73        SEND_VAR                                                 !5
   34    74        DO_ICALL                                         $51     
         75        ASSIGN                                                   !5, $51
   31    76      > JMP                                                      ->49
         77    >   FE_FREE                                                  $36
   44    78        TYPE_CHECK                                    2  ~53     !2
         79        BOOL_NOT                                         ~54     ~53
         80      > JMPZ                                                     ~54, ->90
   45    81    >   INIT_FCALL                                               'str_replace'
         82        SEND_VAL                                                 '%3Ca+href%3D'
         83        ROPE_INIT                                     3  ~56     '%3Ca+'
         84        ROPE_ADD                                      1  ~56     ~56, !2
         85        ROPE_END                                      2  ~55     ~56, '+href%3D'
         86        SEND_VAL                                                 ~55
         87        SEND_VAR                                                 !5
         88        DO_ICALL                                         $58     
         89        ASSIGN                                                   !5, $58
   48    90    >   BOOL_NOT                                         ~60     !1
         91      > JMPZ                                                     ~60, ->96
   49    92    >   INIT_FCALL                                               'nl2br'
         93        SEND_VAR                                                 !5
         94        DO_ICALL                                         $61     
         95        ASSIGN                                                   !5, $61
   52    96    >   INIT_FCALL                                               'substr'
         97        SEND_VAR                                                 !5
         98        SEND_VAL                                                 1
         99        DO_ICALL                                         $63     
        100        ASSIGN                                                   !14, $63
   54   101      > RETURN                                                   !14
   55   102*     > RETURN                                                   null


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/S9t6p
function name:  {closure}
number of ops:  40
compiled vars:  !0 = $m, !1 = $type, !2 = $number, !3 = $revision, !4 = $volume, !5 = $before
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   34     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
          2        BIND_STATIC                                              !2
          3        BIND_STATIC                                              !3
          4        BIND_STATIC                                              !4
          5        BIND_STATIC                                              !5
   35     6        INIT_FCALL_BY_NAME                                       'resolve_index'
          7        SEND_VAR_EX                                              !0
          8        SEND_VAR_EX                                              !1
          9        DO_FCALL                                      0  $6      
         10        ASSIGN                                                   !1, $6
   36    11        INIT_FCALL_BY_NAME                                       'resolve_index'
         12        SEND_VAR_EX                                              !0
         13        SEND_VAR_EX                                              !2
         14        DO_FCALL                                      0  $8      
         15        ASSIGN                                                   !2, $8
   37    16        INIT_FCALL_BY_NAME                                       'resolve_index'
         17        SEND_VAR_EX                                              !0
         18        SEND_VAR_EX                                              !3
         19        DO_FCALL                                      0  $10     
         20        ASSIGN                                                   !3, $10
   38    21        INIT_FCALL_BY_NAME                                       'resolve_index'
         22        SEND_VAR_EX                                              !0
         23        SEND_VAR_EX                                              !4
         24        DO_FCALL                                      0  $12     
         25        ASSIGN                                                   !4, $12
   39    26        INIT_FCALL_BY_NAME                                       'resolve_index'
         27        SEND_VAR_EX                                              !0
         28        SEND_VAR_EX                                              !5
         29        DO_FCALL                                      0  $14     
         30        ASSIGN                                                   !5, $14
   41    31        INIT_FCALL_BY_NAME                                       'build_url'
         32        SEND_VAR_EX                                              !1
         33        SEND_VAR_EX                                              !2
         34        SEND_VAR_EX                                              !3
         35        SEND_VAR_EX                                              !4
         36        SEND_VAR_EX                                              !5
         37        DO_FCALL                                      0  $16     
         38      > RETURN                                                   $16
   42    39*     > RETURN                                                   null

End of Dynamic Function 0

End of function application_text_process

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
236.95 ms | 1029 KiB | 19 Q