3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data['content'] = "<script>test</script>"; $data['contentJS'] = ''; preg_match_all("'<script(.*?)>(.*?)</script>'si", $data['content'], $matches); if (isset($matches[0]) && !empty($matches[0])) { foreach ($matches[0] as $match) { $data['contentJS'] .= $match; $data['content'] = str_replace($match, '', $data['content']); } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 12, Position 2 = 15
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 31
Branch analysis from position: 16
2 jumps found. (Code = 77) Position 1 = 18, Position 2 = 30
Branch analysis from position: 18
2 jumps found. (Code = 78) Position 1 = 19, Position 2 = 30
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
Branch analysis from position: 31
Branch analysis from position: 15
filename:       /in/9MPAs
function name:  (null)
number of ops:  32
compiled vars:  !0 = $data, !1 = $matches, !2 = $match
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN_DIM                                               !0, 'content'
          1        OP_DATA                                                  '%3Cscript%3Etest%3C%2Fscript%3E'
    3     2        ASSIGN_DIM                                               !0, 'contentJS'
          3        OP_DATA                                                  ''
    4     4        INIT_FCALL                                               'preg_match_all'
          5        SEND_VAL                                                 '%27%3Cscript%28.%2A%3F%29%3E%28.%2A%3F%29%3C%2Fscript%3E%27si'
          6        FETCH_DIM_R                                      ~5      !0, 'content'
          7        SEND_VAL                                                 ~5
          8        SEND_REF                                                 !1
          9        DO_ICALL                                                 
    5    10        ISSET_ISEMPTY_DIM_OBJ                         0  ~7      !1, 0
         11      > JMPZ_EX                                          ~7      ~7, ->15
         12    >   ISSET_ISEMPTY_DIM_OBJ                         1  ~8      !1, 0
         13        BOOL_NOT                                         ~9      ~8
         14        BOOL                                             ~7      ~9
         15    > > JMPZ                                                     ~7, ->31
    6    16    >   FETCH_DIM_R                                      ~10     !1, 0
         17      > FE_RESET_R                                       $11     ~10, ->30
         18    > > FE_FETCH_R                                               $11, !2, ->30
    7    19    >   ASSIGN_DIM_OP                .=               8          !0, 'contentJS'
         20        OP_DATA                                                  !2
    8    21        INIT_FCALL                                               'str_replace'
         22        SEND_VAR                                                 !2
         23        SEND_VAL                                                 ''
         24        FETCH_DIM_R                                      ~14     !0, 'content'
         25        SEND_VAL                                                 ~14
         26        DO_ICALL                                         $15     
         27        ASSIGN_DIM                                               !0, 'content'
         28        OP_DATA                                                  $15
    6    29      > JMP                                                      ->18
         30    >   FE_FREE                                                  $11
   10    31    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
185.27 ms | 1396 KiB | 17 Q