3v4l.org

run code in 300+ PHP versions simultaneously
<?php preg_match('/^(foo)(bar)(baz)?$/', 'foobar', list($foo, $bar, $baz) = $matches); print_r(get_defined_vars());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ItspG
function name:  (null)
number of ops:  18
compiled vars:  !0 = $matches, !1 = $foo, !2 = $bar, !3 = $baz
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'preg_match'
          1        SEND_VAL                                                 '%2F%5E%28foo%29%28bar%29%28baz%29%3F%24%2F'
          2        SEND_VAL                                                 'foobar'
          3        QM_ASSIGN                                        ~4      !0
          4        FETCH_LIST_R                                     $5      ~4, 0
          5        ASSIGN                                                   !1, $5
          6        FETCH_LIST_R                                     $7      ~4, 1
          7        ASSIGN                                                   !2, $7
          8        FETCH_LIST_R                                     $9      ~4, 2
          9        ASSIGN                                                   !3, $9
         10        SEND_VAL_EX                                              ~4
         11        DO_ICALL                                                 
    5    12        INIT_FCALL                                               'print_r'
         13        INIT_FCALL                                               'get_defined_vars'
         14        DO_ICALL                                         $12     
         15        SEND_VAR                                                 $12
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.14 ms | 1394 KiB | 19 Q