3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public function testMe() { $sut = new class(self::foo('foo')) {}; } private static function foo($foo) { var_dump($foo); } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/haUjN
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E > > RETURN                                                   1

Class class@anonymous: [no user functions]
Class Test:
Function testme:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/haUjN
function name:  testMe
number of ops:  9
compiled vars:  !0 = $sut
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   DECLARE_ANON_CLASS                               <unknown> 
          1        NEW                                              $2      $1
          2        INIT_STATIC_METHOD_CALL                                  'foo'
          3        SEND_VAL_EX                                              'foo'
          4        DO_FCALL                                      0  $3      
          5        SEND_VAR_NO_REF_EX                                       $3
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !0, $2
    9     8      > RETURN                                                   null

End of function testme

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/haUjN
function name:  foo
number of ops:  5
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   13     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
   14     4      > RETURN                                                   null

End of function foo

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.96 ms | 1395 KiB | 15 Q