3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Test { function method($a = self::UNDEFINED) { } } $rp = new ReflectionParameter(['Test', 'method'], 'a'); $val = $rp->getDefaultValue();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/X8gXu
function name:  (null)
number of ops:  9
compiled vars:  !0 = $rp, !1 = $val
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   10     0  E >   NEW                                                  $2      'ReflectionParameter'
          1        SEND_VAL_EX                                                  <array>
          2        SEND_VAL_EX                                                  'a'
          3        DO_FCALL                                          0          
          4        ASSIGN                                                       !0, $2
   11     5        INIT_METHOD_CALL                                             !0, 'getDefaultValue'
          6        DO_FCALL                                          0  $5      
          7        ASSIGN                                                       !1, $5
          8      > RETURN                                                       1

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

End of function method

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
203.53 ms | 2492 KiB | 13 Q