3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait Foo { public $hidden; function __call($name, $arguments) { echo 'hello from overload'; } } class Bar { function hello() { echo 'hello from bar'; } } class Cheese extends Bar { static function deleteMe($obj) { unset($obj); } } $foo = new Bar(); Cheese::deleteMe($foo); $foo->hello();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1N9Fa
function name:  (null)
number of ops:  9
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   36     0  E >   NEW                                              $1      'Bar'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   38     3        INIT_STATIC_METHOD_CALL                                  'Cheese', 'deleteMe'
          4        SEND_VAR                                                 !0
          5        DO_FCALL                                      0          
   41     6        INIT_METHOD_CALL                                         !0, 'hello'
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

Class Foo:
Function __call:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1N9Fa
function name:  __call
number of ops:  4
compiled vars:  !0 = $name, !1 = $arguments
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   11     2        ECHO                                                     'hello+from+overload'
   12     3      > RETURN                                                   null

End of function __call

End of class Foo.

Class Bar:
Function hello:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1N9Fa
function name:  hello
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   ECHO                                                     'hello+from+bar'
   22     1      > RETURN                                                   null

End of function hello

End of class Bar.

Class Cheese:
Function deleteme:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1N9Fa
function name:  deleteMe
number of ops:  3
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   RECV                                             !0      
   30     1        UNSET_CV                                                 !0
   31     2      > RETURN                                                   null

End of function deleteme

Function hello:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1N9Fa
function name:  hello
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   ECHO                                                     'hello+from+bar'
   22     1      > RETURN                                                   null

End of function hello

End of class Cheese.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.57 ms | 1386 KiB | 13 Q