3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = '<table id="table-1"> <tbody> <tr><td><p>{{Phrase 1}}</p></td></tr> </tbody> </table> <table id="table-2"> <tbody> <tr><td><p>Sample text 1 goes here..</p></td></tr> </tbody> </table> <table id="table-3"> <tbody> <tr><td><p>{{Phrase 2}}</p></td></tr> </tbody> </table> <table id="table-4"> <tbody> <tr><td><p>Sample text 2 goes here..</p></td></tr> </tbody> </table>'; $arr = explode(PHP_EOL.PHP_EOL.PHP_EOL , strip_tags($html)); For($i=1; $i<count($arr);){ Echo trim($arr[$i]) . "<Br>\n"; $i = $i+2; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 11
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 11
Branch analysis from position: 22
Branch analysis from position: 11
filename:       /in/gPQZn
function name:  (null)
number of ops:  23
compiled vars:  !0 = $html, !1 = $arr, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Ctable+id%3D%22table-1%22%3E%0A++++%3Ctbody%3E%0A++++++++%3Ctr%3E%3Ctd%3E%3Cp%3E%7B%7BPhrase+1%7D%7D%3C%2Fp%3E%3C%2Ftd%3E%3C%2Ftr%3E%0A++++%3C%2Ftbody%3E%0A++++%3C%2Ftable%3E%0A++++%3Ctable+id%3D%22table-2%22%3E%0A++++%3Ctbody%3E%0A++++++++%3Ctr%3E%3Ctd%3E%3Cp%3ESample+text+1+goes+here..%3C%2Fp%3E%3C%2Ftd%3E%3C%2Ftr%3E%0A++++%3C%2Ftbody%3E%0A++++%3C%2Ftable%3E%0A++++%3Ctable+id%3D%22table-3%22%3E%0A++++%3Ctbody%3E%0A++++++++%3Ctr%3E%3Ctd%3E%3Cp%3E%7B%7BPhrase+2%7D%7D%3C%2Fp%3E%3C%2Ftd%3E%3C%2Ftr%3E%0A++++%3C%2Ftbody%3E%0A++++%3C%2Ftable%3E%0A++++%3Ctable+id%3D%22table-4%22%3E%0A++++%3Ctbody%3E%0A++++++++%3Ctr%3E%3Ctd%3E%3Cp%3ESample+text+2+goes+here..%3C%2Fp%3E%3C%2Ftd%3E%3C%2Ftr%3E%0A++++%3C%2Ftbody%3E%0A++++%3C%2Ftable%3E'
   24     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '%0A%0A%0A'
          3        INIT_FCALL                                               'strip_tags'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $4      
          6        SEND_VAR                                                 $4
          7        DO_ICALL                                         $5      
          8        ASSIGN                                                   !1, $5
   26     9        ASSIGN                                                   !2, 1
         10      > JMP                                                      ->19
   27    11    >   INIT_FCALL                                               'trim'
         12        FETCH_DIM_R                                      ~8      !1, !2
         13        SEND_VAL                                                 ~8
         14        DO_ICALL                                         $9      
         15        CONCAT                                           ~10     $9, '%3CBr%3E%0A'
         16        ECHO                                                     ~10
   28    17        ADD                                              ~11     !2, 2
         18        ASSIGN                                                   !2, ~11
   26    19    >   COUNT                                            ~13     !1
         20        IS_SMALLER                                               !2, ~13
         21      > JMPNZ                                                    ~14, ->11
   29    22    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.84 ms | 1013 KiB | 16 Q