3v4l.org

run code in 300+ PHP versions simultaneously
<?php Class test { private $counter = 0; public function __construct(){ } public function run(){ $this->counter++; if($this->counter == 10){ return false; } else { return true; } } public function getCounterValue(){ return $this->counter; } } $testje = new test(); while($testje->run()){ echo $testje->getCounterValue(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 4
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 4
Branch analysis from position: 10
Branch analysis from position: 4
filename:       /in/kA5Cl
function name:  (null)
number of ops:  11
compiled vars:  !0 = $testje
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   NEW                                              $1      'test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   27     3      > JMP                                                      ->7
   28     4    >   INIT_METHOD_CALL                                         !0, 'getCounterValue'
          5        DO_FCALL                                      0  $4      
          6        ECHO                                                     $4
   27     7    >   INIT_METHOD_CALL                                         !0, 'run'
          8        DO_FCALL                                      0  $5      
          9      > JMPNZ                                                    $5, ->4
   29    10    > > RETURN                                                   1

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

End of function __construct

Function run:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kA5Cl
function name:  run
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   PRE_INC_OBJ                                              'counter'
   12     1        FETCH_OBJ_R                                      ~1      'counter'
          2        IS_EQUAL                                                 ~1, 10
          3      > JMPZ                                                     ~2, ->6
   13     4    > > RETURN                                                   <false>
          5*       JMP                                                      ->7
   15     6    > > RETURN                                                   <true>
   17     7*     > RETURN                                                   null

End of function run

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

End of function getcountervalue

End of class test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.21 ms | 1395 KiB | 13 Q