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(); do { echo $testje->getCounterValue(); } while($testje->run());
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 3
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
filename:       /in/YKKav
function name:  (null)
number of ops:  10
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
   29     3    >   INIT_METHOD_CALL                                         !0, 'getCounterValue'
          4        DO_FCALL                                      0  $4      
          5        ECHO                                                     $4
   31     6        INIT_METHOD_CALL                                         !0, 'run'
          7        DO_FCALL                                      0  $5      
          8      > JMPNZ                                                    $5, ->3
          9    > > RETURN                                                   1

Class test:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YKKav
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/YKKav
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/YKKav
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:
157.78 ms | 1395 KiB | 13 Q