3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo1(&$bar = 1) {} function foo2(&$bar = true) {} function foo3(&$bar = []) {} function foo4(&$bar = null) {} $bar2 = 'test'; foo1($bar1); foo2($bar2); foo3($bar3); foo4($bar4); var_dump($bar1, $bar2, $bar3, $bar4);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4Uv7j
function name:  (null)
number of ops:  20
compiled vars:  !0 = $bar2, !1 = $bar1, !2 = $bar3, !3 = $bar4
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN                                                   !0, 'test'
    9     1        INIT_FCALL                                               'foo1'
          2        SEND_REF                                                 !1
          3        DO_FCALL                                      0          
   10     4        INIT_FCALL                                               'foo2'
          5        SEND_REF                                                 !0
          6        DO_FCALL                                      0          
   11     7        INIT_FCALL                                               'foo3'
          8        SEND_REF                                                 !2
          9        DO_FCALL                                      0          
   12    10        INIT_FCALL                                               'foo4'
         11        SEND_REF                                                 !3
         12        DO_FCALL                                      0          
   14    13        INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !1
         15        SEND_VAR                                                 !0
         16        SEND_VAR                                                 !2
         17        SEND_VAR                                                 !3
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

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

End of function foo1

Function foo2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4Uv7j
function name:  foo2
number of ops:  2
compiled vars:  !0 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV_INIT                                        !0      <true>
          1      > RETURN                                                   null

End of function foo2

Function foo3:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4Uv7j
function name:  foo3
number of ops:  2
compiled vars:  !0 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV_INIT                                        !0      <array>
          1      > RETURN                                                   null

End of function foo3

Function foo4:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4Uv7j
function name:  foo4
number of ops:  2
compiled vars:  !0 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV_INIT                                        !0      null
          1      > RETURN                                                   null

End of function foo4

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.02 ms | 1403 KiB | 19 Q