3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Word { private $word = ''; public function setWord($word) { if(!is_string($word)) { throw new InvalidArgumentException('invalid argument variable type'); } $this->word = $word; } public function getWord() { return $this->word; } } class MyWord extends Word { public function setWord($word) { parent::setWord($word); } } $obj = new MyWord; $obj->setWord('hoge'); echo $obj->getWord();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DhSIF
function name:  (null)
number of ops:  10
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   NEW                                              $1      'MyWord'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   25     3        INIT_METHOD_CALL                                         !0, 'setWord'
          4        SEND_VAL_EX                                              'hoge'
          5        DO_FCALL                                      0          
   26     6        INIT_METHOD_CALL                                         !0, 'getWord'
          7        DO_FCALL                                      0  $5      
          8        ECHO                                                     $5
          9      > RETURN                                                   1

Class Word:
Function setword:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DhSIF
function name:  setWord
number of ops:  11
compiled vars:  !0 = $word
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        TYPE_CHECK                                   64  ~1      !0
          2        BOOL_NOT                                         ~2      ~1
          3      > JMPZ                                                     ~2, ->8
    8     4    >   NEW                                              $3      'InvalidArgumentException'
          5        SEND_VAL_EX                                              'invalid+argument+variable+type'
          6        DO_FCALL                                      0          
          7      > THROW                                         0          $3
   10     8    >   ASSIGN_OBJ                                               'word'
          9        OP_DATA                                                  !0
   11    10      > RETURN                                                   null

End of function setword

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

End of function getword

End of class Word.

Class MyWord:
Function setword:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DhSIF
function name:  setWord
number of ops:  5
compiled vars:  !0 = $word
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   RECV                                             !0      
   20     1        INIT_STATIC_METHOD_CALL                                  'setWord'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
   21     4      > RETURN                                                   null

End of function setword

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

End of function getword

End of class MyWord.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.28 ms | 1399 KiB | 13 Q