3v4l.org

run code in 500+ PHP versions simultaneously
<?php $content = "<heading>فهرست اول</heading>hi my name is mahdi whats app <heading>فهرست دوم</heading>how are you<heading>فهرست اول</heading>hi my name is mahdi whats app2 <heading>فهرست دوم</heading>how are you2"; $oldpos =0; $pos =strpos($content, "<heading>",1); While($pos !== false){ $arr[] = Substr($content, $oldpos, $pos-$oldpos); $oldpos = $pos; $pos =strpos($content, "<heading>",$oldpos+1); } $arr[] = Substr($content, $oldpos); Var_dump($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 6
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 6
Branch analysis from position: 18
Branch analysis from position: 6
filename:       /in/UPfbb
function name:  (null)
number of ops:  25
compiled vars:  !0 = $content, !1 = $oldpos, !2 = $pos, !3 = $arr
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '%3Cheading%3E%D9%81%D9%87%D8%B1%D8%B3%D8%AA+%D8%A7%D9%88%D9%84%3C%2Fheading%3Ehi+my+name+is+mahdi++whats+app+%3Cheading%3E%D9%81%D9%87%D8%B1%D8%B3%D8%AA+%D8%AF%D9%88%D9%85%3C%2Fheading%3Ehow+are+you%3Cheading%3E%D9%81%D9%87%D8%B1%D8%B3%D8%AA+%D8%A7%D9%88%D9%84%3C%2Fheading%3Ehi+my+name+is+mahdi++whats+app2+%3Cheading%3E%D9%81%D9%87%D8%B1%D8%B3%D8%AA+%D8%AF%D9%88%D9%85%3C%2Fheading%3Ehow+are+you2'
    5     1        ASSIGN                                                       !1, 0
    6     2        FRAMELESS_ICALL_3                strpos              ~6      !0, '%3Cheading%3E'
          3        OP_DATA                                                      1
          4        ASSIGN                                                       !2, ~6
    8     5      > JMP                                                          ->16
    9     6    >   SUB                                                  ~9      !2, !1
          7        FRAMELESS_ICALL_3                substr              ~10     !0, !1
          8        OP_DATA                                                      ~9
          9        ASSIGN_DIM                                                   !3
         10        OP_DATA                                                      ~10
   10    11        ASSIGN                                                       !1, !2
   11    12        ADD                                                  ~12     !1, 1
         13        FRAMELESS_ICALL_3                strpos              ~13     !0, '%3Cheading%3E'
         14        OP_DATA                                                      ~12
         15        ASSIGN                                                       !2, ~13
    8    16    >   TYPE_CHECK                                      1018          !2
         17      > JMPNZ                                                        ~15, ->6
   13    18    >   FRAMELESS_ICALL_2                substr              ~17     !0, !1
         19        ASSIGN_DIM                                                   !3
         20        OP_DATA                                                      ~17
   14    21        INIT_FCALL                                                   'var_dump'
         22        SEND_VAR                                                     !3
         23        DO_ICALL                                                     
         24      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
234.1 ms | 2293 KiB | 14 Q