3v4l.org

run code in 500+ PHP versions simultaneously
<?php // does not trigger deprecation warning function foo(int $param_optional = null, int $param_required) {} // triggers deprecation warning function bar(int $param_optional = 1, int $param_required) {}
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/biVG1
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E > > RETURN                                                       1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/biVG1
function name:  foo
number of ops:  3
compiled vars:  !0 = $param_optional, !1 = $param_required
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
          2      > 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/biVG1
function name:  bar
number of ops:  3
compiled vars:  !0 = $param_optional, !1 = $param_required
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
          2      > RETURN                                                       null

End of function bar

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
125.86 ms | 475 KiB | 7 Q