3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'Tweet #hashtag'; preg_match("/#(\\w+)/", $string, $matches); $hash = $matches[1]; var_dump( $hash); // Outputs 'hashtag'
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gJcC8
function name:  (null)
number of ops:  12
compiled vars:  !0 = $string, !1 = $matches, !2 = $hash
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Tweet+%23hashtag'
    4     1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%2F%23%28%5Cw%2B%29%2F'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                                 
    5     6        FETCH_DIM_R                                      ~5      !1, 1
          7        ASSIGN                                                   !2, ~5
    6     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !2
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
185 ms | 1394 KiB | 17 Q