3v4l.org

run code in 500+ PHP versions simultaneously
<?php $a = 20; function my_function($b) { $a = 30; global $a, $c; return $c = ($b + $a); } print my_function(40) + $c;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Jrmgk
function name:  (null)
number of ops:  7
compiled vars:  !0 = $a, !1 = $c
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 20
   13     1        INIT_FCALL                                                   'my_function'
          2        SEND_VAL                                                     40
          3        DO_FCALL                                          0  $3      
          4        ADD                                                  ~4      $3, !1
          5        ECHO                                                         ~4
   14     6      > RETURN                                                       1

Function my_function:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Jrmgk
function name:  my_function
number of ops:  8
compiled vars:  !0 = $b, !1 = $a, !2 = $c
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   RECV                                                 !0      
    7     1        ASSIGN                                                       !1, 30
    8     2        BIND_GLOBAL                                                  !1, 'a'
          3        BIND_GLOBAL                                                  !2, 'c'
   10     4        ADD                                                  ~4      !0, !1
          5        ASSIGN                                               ~5      !2, ~4
          6      > RETURN                                                       ~5
   11     7*     > RETURN                                                       null

End of function my_function

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
165.44 ms | 2585 KiB | 14 Q