3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = "ab"; $s1 = "cAbfAbe"; $s2 = $s1; do { $s2 = stristr($s,$s2); echo $s2."\n"; echo substr($s2,0,count($s)+1).".\n"; } while ($s2 != false);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 3
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
filename:       /in/4etAS
function name:  (null)
number of ops:  22
compiled vars:  !0 = $s, !1 = $s1, !2 = $s2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'ab'
    4     1        ASSIGN                                                   !1, 'cAbfAbe'
    5     2        ASSIGN                                                   !2, !1
    7     3    >   INIT_FCALL                                               'stristr'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !2
          6        DO_ICALL                                         $6      
          7        ASSIGN                                                   !2, $6
    8     8        CONCAT                                           ~8      !2, '%0A'
          9        ECHO                                                     ~8
    9    10        INIT_FCALL                                               'substr'
         11        SEND_VAR                                                 !2
         12        SEND_VAL                                                 0
         13        COUNT                                            ~9      !0
         14        ADD                                              ~10     ~9, 1
         15        SEND_VAL                                                 ~10
         16        DO_ICALL                                         $11     
         17        CONCAT                                           ~12     $11, '.%0A'
         18        ECHO                                                     ~12
   10    19        BOOL                                             ~13     !2
         20      > JMPNZ                                                    ~13, ->3
         21    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.77 ms | 1386 KiB | 17 Q