3v4l.org

run code in 300+ PHP versions simultaneously
<?php $var1 = '321'; echo $var1; // will be '321' obviously my_function(); function my_function() { $var1 = '123'; $var2 = 'abc'; return $var1; } echo $var1; // will be '123'
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3dAVh
function name:  (null)
number of ops:  6
compiled vars:  !0 = $var1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '321'
    4     1        ECHO                                                     !0
    5     2        INIT_FCALL_BY_NAME                                       'my_function'
          3        DO_FCALL                                      0          
   12     4        ECHO                                                     !0
          5      > RETURN                                                   1

Function my_function:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3dAVh
function name:  my_function
number of ops:  4
compiled vars:  !0 = $var1, !1 = $var2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN                                                   !0, '123'
    9     1        ASSIGN                                                   !1, 'abc'
   10     2      > RETURN                                                   !0
   11     3*     > RETURN                                                   null

End of function my_function

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.63 ms | 1393 KiB | 13 Q