3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test { const max = 5; protected $_c = 0; public function tst() { $this->_c = ($this->_c + 1) % self::max; if ($this->_c === 0) echo '!'.PHP_EOL; } } $t = new test(); for ($i=0; $i<=16; $i++) { echo $i.' '; $t->tst(); }
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 = 5
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 5
Branch analysis from position: 12
Branch analysis from position: 5
filename:       /in/D3Fe7
function name:  (null)
number of ops:  13
compiled vars:  !0 = $t, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $2      'test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   18     3        ASSIGN                                                   !1, 0
          4      > JMP                                                      ->10
   19     5    >   CONCAT                                           ~6      !1, '+'
          6        ECHO                                                     ~6
   20     7        INIT_METHOD_CALL                                         !0, 'tst'
          8        DO_FCALL                                      0          
   18     9        PRE_INC                                                  !1
         10    >   IS_SMALLER_OR_EQUAL                                      !1, 16
         11      > JMPNZ                                                    ~9, ->5
   21    12    > > RETURN                                                   1

Class test:
Function tst:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/D3Fe7
function name:  tst
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   FETCH_OBJ_R                                      ~1      '_c'
          1        ADD                                              ~2      ~1, 1
          2        MOD                                              ~3      ~2, 5
          3        ASSIGN_OBJ                                               '_c'
          4        OP_DATA                                                  ~3
   10     5        FETCH_OBJ_R                                      ~4      '_c'
          6        IS_IDENTICAL                                             ~4, 0
          7      > JMPZ                                                     ~5, ->9
   11     8    >   ECHO                                                     '%21%0A'
   12     9    > > RETURN                                                   null

End of function tst

End of class test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.12 ms | 1395 KiB | 13 Q