3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Obj { protected $i = 1; public function getI() { return $this->i; } } $o = new Obj(); $c = 0; for ($i = 0; $i < 100000; $i++) { $c += $o->getI(); } echo $c;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 6
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 6
Branch analysis from position: 12
Branch analysis from position: 6
filename:       /in/sn6em
function name:  (null)
number of ops:  14
compiled vars:  !0 = $o, !1 = $c, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $3      'Obj'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
   10     3        ASSIGN                                                   !1, 0
   11     4        ASSIGN                                                   !2, 0
          5      > JMP                                                      ->10
   12     6    >   INIT_METHOD_CALL                                         !0, 'getI'
          7        DO_FCALL                                      0  $8      
          8        ASSIGN_OP                                     1          !1, $8
   11     9        PRE_INC                                                  !2
         10    >   IS_SMALLER                                               !2, 100000
         11      > JMPNZ                                                    ~11, ->6
   14    12    >   ECHO                                                     !1
         13      > RETURN                                                   1

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

End of function geti

End of class Obj.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.85 ms | 1393 KiB | 13 Q