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() { $walk = $this->walk(); for ($i = 0; $i < 100; $i++) { $walk; } } } $person = new Person(); $person->doBoth();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WKCUW
function name:  (null)
number of ops:  6
compiled vars:  !0 = $person
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   NEW                                              $1      'Person'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   24     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/WKCUW
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/WKCUW
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 = 6
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 5
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 5
Branch analysis from position: 8
Branch analysis from position: 5
filename:       /in/WKCUW
function name:  doBoth
number of ops:  9
compiled vars:  !0 = $walk, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_METHOD_CALL                                         'walk'
          1        DO_FCALL                                      0  $2      
          2        ASSIGN                                                   !0, $2
   17     3        ASSIGN                                                   !1, 0
          4      > JMP                                                      ->6
          5    >   PRE_INC                                                  !1
          6    >   IS_SMALLER                                               !1, 100
          7      > JMPNZ                                                    ~6, ->5
   20     8    > > RETURN                                                   null

End of function doboth

End of class Person.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.1 ms | 1386 KiB | 13 Q