3v4l.org

run code in 300+ 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 = 25
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 9
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 9
Branch analysis from position: 27
Branch analysis from position: 9
filename:       /in/UPfbb
function name:  (null)
number of ops:  37
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        INIT_FCALL                                               'strpos'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 '%3Cheading%3E'
          5        SEND_VAL                                                 1
          6        DO_ICALL                                         $6      
          7        ASSIGN                                                   !2, $6
    8     8      > JMP                                                      ->25
    9     9    >   INIT_FCALL                                               'substr'
         10        SEND_VAR                                                 !0
         11        SEND_VAR                                                 !1
         12        SUB                                              ~9      !2, !1
         13        SEND_VAL                                                 ~9
         14        DO_ICALL                                         $10     
         15        ASSIGN_DIM                                               !3
         16        OP_DATA                                                  $10
   10    17        ASSIGN                                                   !1, !2
   11    18        INIT_FCALL                                               'strpos'
         19        SEND_VAR                                                 !0
         20        SEND_VAL                                                 '%3Cheading%3E'
         21        ADD                                              ~12     !1, 1
         22        SEND_VAL                                                 ~12
         23        DO_ICALL                                         $13     
         24        ASSIGN                                                   !2, $13
    8    25    >   TYPE_CHECK                                  1018          !2
         26      > JMPNZ                                                    ~15, ->9
   13    27    >   INIT_FCALL                                               'substr'
         28        SEND_VAR                                                 !0
         29        SEND_VAR                                                 !1
         30        DO_ICALL                                         $17     
         31        ASSIGN_DIM                                               !3
         32        OP_DATA                                                  $17
   14    33        INIT_FCALL                                               'var_dump'
         34        SEND_VAR                                                 !3
         35        DO_ICALL                                                 
         36      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.76 ms | 1405 KiB | 19 Q