3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace App; class Foo { const BAR = 'bar'; public function baz(string $arg = Foo::BAR) { } } $r = new \ReflectionMethod(Foo::class, 'baz'); echo $r->getParameters()[0];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LI6OG
function name:  (null)
number of ops:  10
compiled vars:  !0 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $1      'ReflectionMethod'
          1        SEND_VAL_EX                                              'App%5CFoo'
          2        SEND_VAL_EX                                              'baz'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
   15     5        INIT_METHOD_CALL                                         !0, 'getParameters'
          6        DO_FCALL                                      0  $4      
          7        FETCH_DIM_R                                      ~5      $4, 0
          8        ECHO                                                     ~5
          9      > RETURN                                                   1

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

End of function baz

End of class App\Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
243.34 ms | 1006 KiB | 13 Q