3v4l.org

run code in 300+ PHP versions simultaneously
<?php function the_post($loop) { return '&lt;li class="'.(($loop % $columns) == 0 ? 'last' : (((($loop - 1) % $columns) == 0 ) ? 'first' : '')).'"&gt; &lt;/li&gt;'; } $loop = 2; $columns = 3; while ( $loop < 12 ){ echo the_post($loop); $loop++; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 3
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 3
Branch analysis from position: 10
Branch analysis from position: 3
filename:       /in/Vsbqg
function name:  (null)
number of ops:  11
compiled vars:  !0 = $loop, !1 = $columns
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN                                                   !0, 2
    9     1        ASSIGN                                                   !1, 3
   11     2      > JMP                                                      ->8
   12     3    >   INIT_FCALL                                               'the_post'
          4        SEND_VAR                                                 !0
          5        DO_FCALL                                      0  $4      
          6        ECHO                                                     $4
   13     7        PRE_INC                                                  !0
   11     8    >   IS_SMALLER                                               !0, 12
          9      > JMPNZ                                                    ~6, ->3
   14    10    > > RETURN                                                   1

Function the_post:
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 = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Vsbqg
function name:  the_post
number of ops:  18
compiled vars:  !0 = $loop, !1 = $columns
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        MOD                                              ~2      !0, !1
          2        IS_EQUAL                                                 ~2, 0
          3      > JMPZ                                                     ~3, ->6
          4    >   QM_ASSIGN                                        ~4      'last'
          5      > JMP                                                      ->14
          6    >   SUB                                              ~5      !0, 1
          7        MOD                                              ~6      ~5, !1
          8        IS_EQUAL                                                 ~6, 0
          9      > JMPZ                                                     ~7, ->12
         10    >   QM_ASSIGN                                        ~8      'first'
         11      > JMP                                                      ->13
         12    >   QM_ASSIGN                                        ~8      ''
         13    >   QM_ASSIGN                                        ~4      ~8
         14    >   CONCAT                                           ~9      '%26lt%3Bli+class%3D%22', ~4
         15        CONCAT                                           ~10     ~9, '%22%26gt%3B%0A%26lt%3B%2Fli%26gt%3B'
         16      > RETURN                                                   ~10
    6    17*     > RETURN                                                   null

End of function the_post

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.19 ms | 1399 KiB | 14 Q