3v4l.org

run code in 300+ PHP versions simultaneously
<?php $value_pattern = "\"(?:[^\"]|\")*\""; $variable_pattern = '\w+ *\= *' . $value_pattern; $block_pattern = "\[(?:[/]|\w)+(?: +'.$variable_pattern.')*\]"; $input = 'Some text broken by an [img src="resx/img.jpg" alt="" full] and more text below.'; echo $block_pattern; $tokens = preg_split('/'.$block_pattern.'/', $input, -1, PREG_SPLIT_DELIM_CAPTURE);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gf0Hm
function name:  (null)
number of ops:  19
compiled vars:  !0 = $value_pattern, !1 = $variable_pattern, !2 = $block_pattern, !3 = $input, !4 = $tokens
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, '%22%28%3F%3A%5B%5E%22%5D%7C%22%29%2A%22'
    5     1        CONCAT                                           ~6      '%5Cw%2B+%2A%5C%3D+%2A', !0
          2        ASSIGN                                                   !1, ~6
    6     3        ROPE_INIT                                     3  ~9      '%5C%5B%28%3F%3A%5B%2F%5D%7C%5Cw%29%2B%28%3F%3A+%2B%27.'
          4        ROPE_ADD                                      1  ~9      ~9, !1
          5        ROPE_END                                      2  ~8      ~9, '.%27%29%2A%5C%5D'
          6        ASSIGN                                                   !2, ~8
    7     7        ASSIGN                                                   !3, 'Some+text+broken+by+an+%5Bimg+src%3D%22resx%2Fimg.jpg%22+alt%3D%22%22+full%5D+and+more+text+below.'
    8     8        ECHO                                                     !2
    9     9        INIT_FCALL                                               'preg_split'
         10        CONCAT                                           ~13     '%2F', !2
         11        CONCAT                                           ~14     ~13, '%2F'
         12        SEND_VAL                                                 ~14
         13        SEND_VAR                                                 !3
         14        SEND_VAL                                                 -1
         15        SEND_VAL                                                 2
         16        DO_ICALL                                         $15     
         17        ASSIGN                                                   !4, $15
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.94 ms | 1395 KiB | 15 Q