3v4l.org

run code in 500+ PHP versions simultaneously
<?php $description = 'some text {PID =340} {PID =357}'; echo implode(',', preg_match_all('~\{PID =\K\d+~', $description, $out) ? $out[0] : []);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 10
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WalUc
function name:  (null)
number of ops:  14
compiled vars:  !0 = $description, !1 = $out
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, 'some+text+%7BPID+%3D340%7D++%7BPID+%3D357%7D'
    3     1        INIT_FCALL                                                   'preg_match_all'
          2        SEND_VAL                                                     '%7E%5C%7BPID+%3D%5CK%5Cd%2B%7E'
          3        SEND_VAR                                                     !0
          4        SEND_REF                                                     !1
          5        DO_ICALL                                             $3      
          6      > JMPZ                                                         $3, ->10
          7    >   FETCH_DIM_R                                          ~4      !1, 0
          8        QM_ASSIGN                                            ~5      ~4
          9      > JMP                                                          ->11
         10    >   QM_ASSIGN                                            ~5      <array>
         11    >   FRAMELESS_ICALL_2                implode             ~6      '%2C', ~5
         12        ECHO                                                         ~6
         13      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
161.76 ms | 2050 KiB | 14 Q