3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Animal{ protected $isAlive; public function __construct(){ $this->isAlive = true; } public function isAlive(){ return $this->isAlive; } } class Cat extends Animal{ public function __construct(){ //we forgot something... } } $cat = new Cat(); var_dump($cat->isAlive());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Dsr2J
function name:  (null)
number of ops:  9
compiled vars:  !0 = $cat
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   NEW                                              $1      'Cat'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   22     3        INIT_FCALL                                               'var_dump'
          4        INIT_METHOD_CALL                                         !0, 'isAlive'
          5        DO_FCALL                                      0  $4      
          6        SEND_VAR                                                 $4
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Class Animal:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Dsr2J
function name:  __construct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN_OBJ                                               'isAlive'
          1        OP_DATA                                                  <true>
    8     2      > RETURN                                                   null

End of function __construct

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

End of function isalive

End of class Animal.

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

End of function __construct

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

End of function isalive

End of class Cat.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.94 ms | 1396 KiB | 15 Q