3v4l.org

run code in 500+ PHP versions simultaneously
<?php $string = '{},\"employees\":{},\"idIwant\":{\"2545\":{\"attributes\":{\"offset\":9855,'; echo preg_match('~"idIwant\\\":{\\\"\K\d+~', $string, $out) ? $out[0] : 'bonk';
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/0hmvp
function name:  (null)
number of ops:  13
compiled vars:  !0 = $string, !1 = $out
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, '%7B%7D%2C%5C%22employees%5C%22%3A%7B%7D%2C%5C%22idIwant%5C%22%3A%7B%5C%222545%5C%22%3A%7B%5C%22attributes%5C%22%3A%7B%5C%22offset%5C%22%3A9855%2C'
    4     1        INIT_FCALL                                                   'preg_match'
          2        SEND_VAL                                                     '%7E%22idIwant%5C%5C%22%3A%7B%5C%5C%22%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      'bonk'
         11    >   ECHO                                                         ~5
         12      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
176.75 ms | 2109 KiB | 13 Q