3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = 0; $nxt = 0; $limit = 10; for($i = 0; $i<$limit; $i++){ echo $a = $a?$a:1; $nxt = $nxt+$a; echo ", "; }
based on 22DMA
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = 16
Branch analysis from position: 16
Jump found. Position 1 = 18, Position 2 = 5
Branch analysis from position: 18
Jump found. Position 1 = -2
Branch analysis from position: 5
Jump found. Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
Jump found. Position 1 = 9
Branch analysis from position: 9
Jump found. Position 1 = 18, Position 2 = 5
Branch analysis from position: 18
Branch analysis from position: 5
Branch analysis from position: 8
Jump found. Position 1 = 18, Position 2 = 5
Branch analysis from position: 18
Branch analysis from position: 5
filename:       /in/02phX
function name:  (null)
number of ops:  19
compiled vars:  !0 = $a, !1 = $nxt, !2 = $limit, !3 = $i
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   ASSIGN                                                   !0, 0
   3     1        ASSIGN                                                   !1, 0
   4     2        ASSIGN                                                   !2, 10
   5     3        ASSIGN                                                   !3, 0
         4      > JMP                                                      ->16
   6     5    > > JMPZ                                                     !0, ->8
         6    >   QM_ASSIGN                                        ~8      !0
         7      > JMP                                                      ->9
         8    >   QM_ASSIGN                                        ~8      1
         9    >   ASSIGN                                           $9      !0, ~8
        10        ECHO                                                     $9
   8    11        ADD                                              ~10     !1, !0
        12        ASSIGN                                                   !1, ~10
  10    13        ECHO                                                     '%2C+'
   5    14        POST_INC                                         ~12     !3
        15        FREE                                                     ~12
        16    >   IS_SMALLER                                       ~13     !3, !2
        17      > JMPNZ                                                    ~13, ->5
        18    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.1.0