3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sometext = "Some text **that is bold!** and some other text"; $string = explode('**', $sometext); $newStr = ''; for ($i = 0; $i < count($string); ++$i) { if ($i % 2 == 0 || $i == 0) $newStr .= $string[$i]."<b>"; else $newStr .= $string[$i]."</b>" ; } echo $newStr;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 9
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 47) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 19
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 9
Branch analysis from position: 26
Branch analysis from position: 9
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 9
Branch analysis from position: 26
Branch analysis from position: 9
Branch analysis from position: 14
filename:       /in/mPDvU
function name:  (null)
number of ops:  28
compiled vars:  !0 = $sometext, !1 = $string, !2 = $newStr, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Some+text+%2A%2Athat+is+bold%21%2A%2A+and+some+other+text'
    4     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '%2A%2A'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !1, $5
    5     6        ASSIGN                                                   !2, ''
    6     7        ASSIGN                                                   !3, 0
          8      > JMP                                                      ->23
    7     9    >   MOD                                              ~9      !3, 2
         10        IS_EQUAL                                         ~10     ~9, 0
         11      > JMPNZ_EX                                         ~10     ~10, ->14
         12    >   IS_EQUAL                                         ~11     !3, 0
         13        BOOL                                             ~10     ~11
         14    > > JMPZ                                                     ~10, ->19
    8    15    >   FETCH_DIM_R                                      ~12     !1, !3
         16        CONCAT                                           ~13     ~12, '%3Cb%3E'
         17        ASSIGN_OP                                     8          !2, ~13
         18      > JMP                                                      ->22
   10    19    >   FETCH_DIM_R                                      ~15     !1, !3
         20        CONCAT                                           ~16     ~15, '%3C%2Fb%3E'
         21        ASSIGN_OP                                     8          !2, ~16
    6    22    >   PRE_INC                                                  !3
         23    >   COUNT                                            ~19     !1
         24        IS_SMALLER                                               !3, ~19
         25      > JMPNZ                                                    ~20, ->9
   13    26    >   ECHO                                                     !2
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.15 ms | 1396 KiB | 15 Q