3v4l.org

run code in 500+ PHP versions simultaneously
<?php declare(strict_types = 1); namespace A\B; class C { /** * @param object $bar * @return object */ function foo(object $bar) { /** @var object */ $a = $bar; return $a; } } $c = new C(); $c->foo(new \stdClass());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5aGU7
function name:  (null)
number of ops:  9
compiled vars:  !0 = $c
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   17     0  E >   NEW                                                  $1      'A%5CB%5CC'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $1
   18     3        INIT_METHOD_CALL                                             !0, 'foo'
          4        NEW                                                  $4      'stdClass'
          5        DO_FCALL                                          0          
          6        SEND_VAR_NO_REF_EX                                           $4
          7        DO_FCALL                                          0          
          8      > RETURN                                                       1

Class A\B\C:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5aGU7
function name:  foo
number of ops:  4
compiled vars:  !0 = $bar, !1 = $a
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   10     0  E >   RECV                                                 !0      
   12     1        ASSIGN                                                       !1, !0
   13     2      > RETURN                                                       !1
   14     3*     > RETURN                                                       null

End of function foo

End of class A\B\C.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
257.6 ms | 2220 KiB | 13 Q