3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Person { public function walk() { return "WALK"; } public function run() { return "RUN"; } public function doBoth() { for ($i = 0; $i < 100; $i++) { $this->walk(); } } } $person = new Person(); $person->doBoth();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LkSqH
function name:  (null)
number of ops:  6
compiled vars:  !0 = $person
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   NEW                                              $1      'Person'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   23     3        INIT_METHOD_CALL                                         !0, 'doBoth'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

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

End of function walk

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

End of function run

Function doboth:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 7, Position 2 = 2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 7, Position 2 = 2
Branch analysis from position: 7
Branch analysis from position: 2
filename:       /in/LkSqH
function name:  doBoth
number of ops:  8
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   ASSIGN                                                   !0, 0
          1      > JMP                                                      ->5
   17     2    >   INIT_METHOD_CALL                                         'walk'
          3        DO_FCALL                                      0          
   16     4        PRE_INC                                                  !0
          5    >   IS_SMALLER                                               !0, 100
          6      > JMPNZ                                                    ~4, ->2
   19     7    > > RETURN                                                   null

End of function doboth

End of class Person.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.47 ms | 1395 KiB | 13 Q