3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Bar { public function getSalt(); } class Foo implements Bar { public $salt; public function __call($name, $args) { if ($name == 'getSalt') return $this->salt; } } new Foo;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KIc6S
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   DECLARE_CLASS                                            'foo'
   20     1        NEW                                              $0      'Foo'
          2        DO_FCALL                                      0          
          3        FREE                                                     $0
          4      > RETURN                                                   1

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

End of function getsalt

End of class Bar.

Class Foo:
Function __call:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KIc6S
function name:  __call
number of ops:  7
compiled vars:  !0 = $name, !1 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   15     2        IS_EQUAL                                                 !0, 'getSalt'
          3      > JMPZ                                                     ~2, ->6
   16     4    >   FETCH_OBJ_R                                      ~3      'salt'
          5      > RETURN                                                   ~3
   17     6    > > RETURN                                                   null

End of function __call

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.68 ms | 1393 KiB | 13 Q