3v4l.org

run code in 500+ PHP versions simultaneously
<?php function foo(string $a = null) {} const A = null; function bar(string $a = A) {} foo(); // Deprecated bar(); // Fatal error ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/g846c
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    6     0  E >   DECLARE_CONST                                                'A', null
    9     1        INIT_FCALL                                                   'foo'
          2        DO_FCALL                                          0          
   10     3        INIT_FCALL                                                   'bar'
          4        DO_FCALL                                          0          
   12     5      > RETURN                                                       1

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

End of function foo

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

End of function bar

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
165.99 ms | 1498 KiB | 15 Q