3v4l.org

run code in 300+ PHP versions simultaneously
<?php function _block_get_positions ($txt){ $re1=".*?"; $re2="\\["; $re3=".*?"; $re4="\\["; $re5=".*?"; $re6="\\["; $re7=".*?"; $re8="\\["; $re9=".*?"; $re10="(\\[)"; $re11="(n)"; $re12="(i)"; $re13="(d)"; $re14="(:)"; $re15="(\\d+)"; if ($c=preg_match_all ("/".$re1.$re2.$re3.$re4.$re5.$re6.$re7.$re8.$re9.$re10.$re11.$re12.$re13.$re14.$re15."/is", $txt, $matches)) { $c1=$matches[1][0]; $w1=$matches[2][0]; $c2=$matches[3][0]; $c3=$matches[4][0]; $c4=$matches[5][0]; $int1=$matches[6][0]; } return $int1; } $a="Fatti&Storie 5 - Lorem ipsum dolor nid:666 [bid:667] [cid:668] [id:669] [12] sit amet [nid:112]"; print(_block_get_position($a));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MbvsQ
function name:  (null)
number of ops:  6
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E >   ASSIGN                                                   !0, 'Fatti%26Storie%C2%A05%C2%A0-%C2%A0Lorem%C2%A0ipsum%C2%A0dolor%C2%A0nid%3A666%C2%A0%5Bbid%3A667%5D%C2%A0%5Bcid%3A668%5D%C2%A0%5Bid%3A669%5D%C2%A0%5B12%5D%C2%A0sit%C2%A0amet%C2%A0%5Bnid%3A112%5D'
   31     1        INIT_FCALL_BY_NAME                                       '_block_get_position'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $2      
          4        ECHO                                                     $2
          5      > RETURN                                                   1

Function _block_get_positions:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 39, Position 2 = 57
Branch analysis from position: 39
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 57
filename:       /in/MbvsQ
function name:  _block_get_positions
number of ops:  59
compiled vars:  !0 = $txt, !1 = $re1, !2 = $re2, !3 = $re3, !4 = $re4, !5 = $re5, !6 = $re6, !7 = $re7, !8 = $re8, !9 = $re9, !10 = $re10, !11 = $re11, !12 = $re12, !13 = $re13, !14 = $re14, !15 = $re15, !16 = $c, !17 = $matches, !18 = $c1, !19 = $w1, !20 = $c2, !21 = $c3, !22 = $c4, !23 = $int1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        ASSIGN                                                   !1, '.%2A%3F'
    4     2        ASSIGN                                                   !2, '%5C%5B'
    5     3        ASSIGN                                                   !3, '.%2A%3F'
    6     4        ASSIGN                                                   !4, '%5C%5B'
    7     5        ASSIGN                                                   !5, '.%2A%3F'
    8     6        ASSIGN                                                   !6, '%5C%5B'
    9     7        ASSIGN                                                   !7, '.%2A%3F'
   10     8        ASSIGN                                                   !8, '%5C%5B'
   11     9        ASSIGN                                                   !9, '.%2A%3F'
   12    10        ASSIGN                                                   !10, '%28%5C%5B%29'
   13    11        ASSIGN                                                   !11, '%28n%29'
   14    12        ASSIGN                                                   !12, '%28i%29'
   15    13        ASSIGN                                                   !13, '%28d%29'
   16    14        ASSIGN                                                   !14, '%28%3A%29'
   17    15        ASSIGN                                                   !15, '%28%5Cd%2B%29'
   18    16        INIT_FCALL                                               'preg_match_all'
         17        CONCAT                                           ~39     '%2F', !1
         18        CONCAT                                           ~40     ~39, !2
         19        CONCAT                                           ~41     ~40, !3
         20        CONCAT                                           ~42     ~41, !4
         21        CONCAT                                           ~43     ~42, !5
         22        CONCAT                                           ~44     ~43, !6
         23        CONCAT                                           ~45     ~44, !7
         24        CONCAT                                           ~46     ~45, !8
         25        CONCAT                                           ~47     ~46, !9
         26        CONCAT                                           ~48     ~47, !10
         27        CONCAT                                           ~49     ~48, !11
         28        CONCAT                                           ~50     ~49, !12
         29        CONCAT                                           ~51     ~50, !13
         30        CONCAT                                           ~52     ~51, !14
         31        CONCAT                                           ~53     ~52, !15
         32        CONCAT                                           ~54     ~53, '%2Fis'
         33        SEND_VAL                                                 ~54
         34        SEND_VAR                                                 !0
         35        SEND_REF                                                 !17
         36        DO_ICALL                                         $55     
         37        ASSIGN                                           ~56     !16, $55
         38      > JMPZ                                                     ~56, ->57
   19    39    >   FETCH_DIM_R                                      ~57     !17, 1
         40        FETCH_DIM_R                                      ~58     ~57, 0
         41        ASSIGN                                                   !18, ~58
   20    42        FETCH_DIM_R                                      ~60     !17, 2
         43        FETCH_DIM_R                                      ~61     ~60, 0
         44        ASSIGN                                                   !19, ~61
   21    45        FETCH_DIM_R                                      ~63     !17, 3
         46        FETCH_DIM_R                                      ~64     ~63, 0
         47        ASSIGN                                                   !20, ~64
   22    48        FETCH_DIM_R                                      ~66     !17, 4
         49        FETCH_DIM_R                                      ~67     ~66, 0
         50        ASSIGN                                                   !21, ~67
   23    51        FETCH_DIM_R                                      ~69     !17, 5
         52        FETCH_DIM_R                                      ~70     ~69, 0
         53        ASSIGN                                                   !22, ~70
   24    54        FETCH_DIM_R                                      ~72     !17, 6
         55        FETCH_DIM_R                                      ~73     ~72, 0
         56        ASSIGN                                                   !23, ~73
   26    57    > > RETURN                                                   !23
   27    58*     > RETURN                                                   null

End of function _block_get_positions

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.77 ms | 1400 KiB | 15 Q