3v4l.org

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

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

End of function myfunction

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.81 ms | 1397 KiB | 14 Q