3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo strlen("abcd"); $s = "arc"; echo "count: " . strlen($s) . "\n"; $string = "Marcus"; $rest = $string; do { $rest = stristr($rest,$s); echo "rest: $rest\n"; $s3 = substr($rest,0,strlen($s)); $string = str_replace($s3,"<$s3>",$string); echo "s3: $s3\n"; $rest = substr($rest,strlen($s)); echo "rest: $rest\n"; echo "=======\n"; } while ($rest != false); echo "string: $string\n";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 50, Position 2 = 8
Branch analysis from position: 50
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/s6Hl2
function name:  (null)
number of ops:  55
compiled vars:  !0 = $s, !1 = $string, !2 = $rest, !3 = $s3
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ECHO                                                     4
    5     1        ASSIGN                                                   !0, 'arc'
    6     2        STRLEN                                           ~5      !0
          3        CONCAT                                           ~6      'count%3A+', ~5
          4        CONCAT                                           ~7      ~6, '%0A'
          5        ECHO                                                     ~7
    7     6        ASSIGN                                                   !1, 'Marcus'
    8     7        ASSIGN                                                   !2, !1
   10     8    >   INIT_FCALL                                               'stristr'
          9        SEND_VAR                                                 !2
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $10     
         12        ASSIGN                                                   !2, $10
   11    13        ROPE_INIT                                     3  ~13     'rest%3A+'
         14        ROPE_ADD                                      1  ~13     ~13, !2
         15        ROPE_END                                      2  ~12     ~13, '%0A'
         16        ECHO                                                     ~12
   12    17        INIT_FCALL                                               'substr'
         18        SEND_VAR                                                 !2
         19        SEND_VAL                                                 0
         20        STRLEN                                           ~15     !0
         21        SEND_VAL                                                 ~15
         22        DO_ICALL                                         $16     
         23        ASSIGN                                                   !3, $16
   13    24        INIT_FCALL                                               'str_replace'
         25        SEND_VAR                                                 !3
         26        ROPE_INIT                                     3  ~19     '%3C'
         27        ROPE_ADD                                      1  ~19     ~19, !3
         28        ROPE_END                                      2  ~18     ~19, '%3E'
         29        SEND_VAL                                                 ~18
         30        SEND_VAR                                                 !1
         31        DO_ICALL                                         $21     
         32        ASSIGN                                                   !1, $21
   14    33        ROPE_INIT                                     3  ~24     's3%3A+'
         34        ROPE_ADD                                      1  ~24     ~24, !3
         35        ROPE_END                                      2  ~23     ~24, '%0A'
         36        ECHO                                                     ~23
   15    37        INIT_FCALL                                               'substr'
         38        SEND_VAR                                                 !2
         39        STRLEN                                           ~26     !0
         40        SEND_VAL                                                 ~26
         41        DO_ICALL                                         $27     
         42        ASSIGN                                                   !2, $27
   16    43        ROPE_INIT                                     3  ~30     'rest%3A+'
         44        ROPE_ADD                                      1  ~30     ~30, !2
         45        ROPE_END                                      2  ~29     ~30, '%0A'
         46        ECHO                                                     ~29
   17    47        ECHO                                                     '%3D%3D%3D%3D%3D%3D%3D%0A'
   18    48        BOOL                                             ~32     !2
         49      > JMPNZ                                                    ~32, ->8
   19    50    >   ROPE_INIT                                     3  ~34     'string%3A+'
         51        ROPE_ADD                                      1  ~34     ~34, !1
         52        ROPE_END                                      2  ~33     ~34, '%0A'
         53        ECHO                                                     ~33
         54      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.5 ms | 1400 KiB | 19 Q