3v4l.org

run code in 500+ PHP versions simultaneously
<?php $text = "name:value|name1:value1|name2:value2"; $result = ""; if (preg_match('~\bname2:([^|]*)~', $text, $m)) { $result = $m[1]; } echo $result;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/mq2Ma
function name:  (null)
number of ops:  12
compiled vars:  !0 = $text, !1 = $result, !2 = $m
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'name%3Avalue%7Cname1%3Avalue1%7Cname2%3Avalue2'
    4     1        ASSIGN                                                       !1, ''
    5     2        INIT_FCALL                                                   'preg_match'
          3        SEND_VAL                                                     '%7E%5Cbname2%3A%28%5B%5E%7C%5D%2A%29%7E'
          4        SEND_VAR                                                     !0
          5        SEND_REF                                                     !2
          6        DO_ICALL                                             $5      
          7      > JMPZ                                                         $5, ->10
    6     8    >   FETCH_DIM_R                                          ~6      !2, 1
          9        ASSIGN                                                       !1, ~6
    8    10    >   ECHO                                                         !1
    9    11      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
131.96 ms | 2008 KiB | 14 Q