3v4l.org

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

Class Obj:
Function geti:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ThrFS
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:
185.76 ms | 939 KiB | 14 Q