3v4l.org

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

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

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.13 ms | 1397 KiB | 14 Q