3v4l.org

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

Class Foo:
Function __call:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/etrRN
function name:  __call
number of ops:  4
compiled vars:  !0 = $name, !1 = $arguments
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   10     2        ECHO                                                     'hello+from+overload'
   11     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/etrRN
function name:  hello
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   ECHO                                                     'hello+from+bar'
   21     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/etrRN
function name:  deleteMe
number of ops:  3
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   RECV                                             !0      
   29     1        UNSET_CV                                                 !0
   30     2      > RETURN                                                   null

End of function deleteme

End of class Cheese.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.69 ms | 1396 KiB | 15 Q