3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Doge { private $name = "Testing"; public function __construct($name) { } public function getName() { return $this->name; } public function equalsWithSameType(self $other) { return ($other->name === $this->name); } public function equalsWithSubType(DogeCoin $sub) { return ($sub->name === $this->name); } } class DogeCoin extends Doge { private $name; public function foo(Doge $d){ return ($d->name === $this->name); } } $first_doge = new Doge('a'); $doge_coin = new DogeCoin('a'); $doge_coin->foo($first_doge);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5NODV
function name:  (null)
number of ops:  12
compiled vars:  !0 = $first_doge, !1 = $doge_coin
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   38     0  E >   NEW                                              $2      'Doge'
          1        SEND_VAL_EX                                              'a'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   39     4        NEW                                              $5      'DogeCoin'
          5        SEND_VAL_EX                                              'a'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $5
   41     8        INIT_METHOD_CALL                                         !1, 'foo'
          9        SEND_VAR_EX                                              !0
         10        DO_FCALL                                      0          
         11      > RETURN                                                   1

Class Doge:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5NODV
function name:  __construct
number of ops:  2
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    9     1      > RETURN                                                   null

End of function __construct

Function getname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5NODV
function name:  getName
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   FETCH_OBJ_R                                      ~0      'name'
          1      > RETURN                                                   ~0
   14     2*     > RETURN                                                   null

End of function getname

Function equalswithsametype:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5NODV
function name:  equalsWithSameType
number of ops:  6
compiled vars:  !0 = $other
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
   18     1        FETCH_OBJ_R                                      ~1      !0, 'name'
          2        FETCH_OBJ_R                                      ~2      'name'
          3        IS_IDENTICAL                                     ~3      ~1, ~2
          4      > RETURN                                                   ~3
   19     5*     > RETURN                                                   null

End of function equalswithsametype

Function equalswithsubtype:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5NODV
function name:  equalsWithSubType
number of ops:  6
compiled vars:  !0 = $sub
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   RECV                                             !0      
   23     1        FETCH_OBJ_R                                      ~1      !0, 'name'
          2        FETCH_OBJ_R                                      ~2      'name'
          3        IS_IDENTICAL                                     ~3      ~1, ~2
          4      > RETURN                                                   ~3
   24     5*     > RETURN                                                   null

End of function equalswithsubtype

End of class Doge.

Class DogeCoin:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5NODV
function name:  foo
number of ops:  6
compiled vars:  !0 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   32     0  E >   RECV                                             !0      
   33     1        FETCH_OBJ_R                                      ~1      !0, 'name'
          2        FETCH_OBJ_R                                      ~2      'name'
          3        IS_IDENTICAL                                     ~3      ~1, ~2
          4      > RETURN                                                   ~3
   34     5*     > RETURN                                                   null

End of function foo

Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5NODV
function name:  __construct
number of ops:  2
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    9     1      > RETURN                                                   null

End of function __construct

Function getname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5NODV
function name:  getName
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   FETCH_OBJ_R                                      ~0      'name'
          1      > RETURN                                                   ~0
   14     2*     > RETURN                                                   null

End of function getname

Function equalswithsametype:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5NODV
function name:  equalsWithSameType
number of ops:  6
compiled vars:  !0 = $other
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
   18     1        FETCH_OBJ_R                                      ~1      !0, 'name'
          2        FETCH_OBJ_R                                      ~2      'name'
          3        IS_IDENTICAL                                     ~3      ~1, ~2
          4      > RETURN                                                   ~3
   19     5*     > RETURN                                                   null

End of function equalswithsametype

Function equalswithsubtype:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5NODV
function name:  equalsWithSubType
number of ops:  6
compiled vars:  !0 = $sub
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   RECV                                             !0      
   23     1        FETCH_OBJ_R                                      ~1      !0, 'name'
          2        FETCH_OBJ_R                                      ~2      'name'
          3        IS_IDENTICAL                                     ~3      ~1, ~2
          4      > RETURN                                                   ~3
   24     5*     > RETURN                                                   null

End of function equalswithsubtype

End of class DogeCoin.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.54 ms | 1407 KiB | 13 Q