3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'hello world, world!'; # 0123456 var_dump(preg_match('/\Gworld/', $string, $matches, PREG_OFFSET_CAPTURE, 6), $matches[0]); var_dump(preg_match('/\Gworld/', $string, $matches, PREG_OFFSET_CAPTURE, 3), $matches[0]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/J6jMQ
function name:  (null)
number of ops:  26
compiled vars:  !0 = $string, !1 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'hello+world%2C+world%21'
    6     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'preg_match'
          3        SEND_VAL                                                 '%2F%5CGworld%2F'
          4        SEND_VAR                                                 !0
          5        SEND_REF                                                 !1
          6        SEND_VAL                                                 256
          7        SEND_VAL                                                 6
          8        DO_ICALL                                         $3      
          9        SEND_VAR                                                 $3
         10        FETCH_DIM_R                                      ~4      !1, 0
         11        SEND_VAL                                                 ~4
         12        DO_ICALL                                                 
    7    13        INIT_FCALL                                               'var_dump'
         14        INIT_FCALL                                               'preg_match'
         15        SEND_VAL                                                 '%2F%5CGworld%2F'
         16        SEND_VAR                                                 !0
         17        SEND_REF                                                 !1
         18        SEND_VAL                                                 256
         19        SEND_VAL                                                 3
         20        DO_ICALL                                         $6      
         21        SEND_VAR                                                 $6
         22        FETCH_DIM_R                                      ~7      !1, 0
         23        SEND_VAL                                                 ~7
         24        DO_ICALL                                                 
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.09 ms | 1395 KiB | 17 Q