3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sourcestring="[img]http://miximoms.dev/static/uploads/n7krkqvkkr/1386778095zkn_playmobil-smooth-criminal.jpg[/img]"; preg_match_all('/\[img\]{1}\[/img\]/',$sourcestring,$match); $myMatches = ""; foreach($match[0] as $thisMatch){ echo "$thisMatch\n"; $myMatches .= "$thisMatch <br\>"; } echo $myMatches;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 17
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 17
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/MCGSQ
function name:  (null)
number of ops:  20
compiled vars:  !0 = $sourcestring, !1 = $match, !2 = $myMatches, !3 = $thisMatch
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%5Bimg%5Dhttp%3A%2F%2Fmiximoms.dev%2Fstatic%2Fuploads%2Fn7krkqvkkr%2F1386778095zkn_playmobil-smooth-criminal.jpg%5B%2Fimg%5D'
    3     1        INIT_FCALL                                               'preg_match_all'
          2        SEND_VAL                                                 '%2F%5C%5Bimg%5C%5D%7B1%7D%5C%5B%2Fimg%5C%5D%2F'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                                 
    5     6        ASSIGN                                                   !2, ''
    7     7        FETCH_DIM_R                                      ~7      !1, 0
          8      > FE_RESET_R                                       $8      ~7, ->17
          9    > > FE_FETCH_R                                               $8, !3, ->17
    8    10    >   NOP                                                      
         11        FAST_CONCAT                                      ~9      !3, '%0A'
         12        ECHO                                                     ~9
    9    13        NOP                                                      
         14        FAST_CONCAT                                      ~10     !3, '+%3Cbr%5C%3E'
         15        ASSIGN_OP                                     8          !2, ~10
    7    16      > JMP                                                      ->9
         17    >   FE_FREE                                                  $8
   12    18        ECHO                                                     !2
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.3 ms | 1395 KiB | 15 Q