3v4l.org

run code in 300+ PHP versions simultaneously
<?php function ref(&$a) {$a = 42;} function val($a) {$a = 42;} $val1 = 7; $val2 = 8; ref($val1); val($val2); var_dump([$val1, $val2]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TQXg1
function name:  (null)
number of ops:  14
compiled vars:  !0 = $val1, !1 = $val2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                   !0, 7
    7     1        ASSIGN                                                   !1, 8
    8     2        INIT_FCALL                                               'ref'
          3        SEND_REF                                                 !0
          4        DO_FCALL                                      0          
    9     5        INIT_FCALL                                               'val'
          6        SEND_VAR                                                 !1
          7        DO_FCALL                                      0          
   11     8        INIT_FCALL                                               'var_dump'
          9        INIT_ARRAY                                       ~6      !0
         10        ADD_ARRAY_ELEMENT                                ~6      !1
         11        SEND_VAL                                                 ~6
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Function ref:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TQXg1
function name:  ref
number of ops:  3
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        ASSIGN                                                   !0, 42
          2      > RETURN                                                   null

End of function ref

Function val:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TQXg1
function name:  val
number of ops:  3
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        ASSIGN                                                   !0, 42
          2      > RETURN                                                   null

End of function val

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.84 ms | 1000 KiB | 16 Q