3v4l.org

run code in 300+ PHP versions simultaneously
<?php $subject = "any"; $b = " "; $delimited = "$b$subject$b"; $str = "Will *any* company do *any* job, (are there any)?"; echo "\nThe string: \"$str\""; $temp = $str; for ($i=0, $max = strlen($temp); $i < $max; $i++) { if (!ctype_alpha($temp[$i]) ){ $temp[$i] = $b; } } while ( ($pos = strpos($temp,$delimited)) !== false ) { echo "\nThe subject \"$subject\" occurs at position ",($pos + 1); for ($i=0,$max=$pos + 1 + strlen($subject); $i <= $max; $i++) { $temp[$i] = $b; } }
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 = 16
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 45
Branch analysis from position: 45
2 jumps found. (Code = 44) Position 1 = 52, Position 2 = 28
Branch analysis from position: 52
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 43
Branch analysis from position: 43
2 jumps found. (Code = 44) Position 1 = 45, Position 2 = 40
Branch analysis from position: 45
Branch analysis from position: 40
2 jumps found. (Code = 44) Position 1 = 45, Position 2 = 40
Branch analysis from position: 45
Branch analysis from position: 40
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 24
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 16
Branch analysis from position: 27
Branch analysis from position: 16
Branch analysis from position: 24
filename:       /in/pM9U3
function name:  (null)
number of ops:  53
compiled vars:  !0 = $subject, !1 = $b, !2 = $delimited, !3 = $str, !4 = $temp, !5 = $i, !6 = $max, !7 = $pos
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'any'
    3     1        ASSIGN                                                   !1, '+'
    4     2        ROPE_INIT                                     3  ~11     !1
          3        ROPE_ADD                                      1  ~11     ~11, !0
          4        ROPE_END                                      2  ~10     ~11, !1
          5        ASSIGN                                                   !2, ~10
    6     6        ASSIGN                                                   !3, 'Will+%2Aany%2A+company+do+%2Aany%2A+job%2C+%28are+there+any%29%3F'
    7     7        ROPE_INIT                                     3  ~16     '%0AThe+string%3A+%22'
          8        ROPE_ADD                                      1  ~16     ~16, !3
          9        ROPE_END                                      2  ~15     ~16, '%22'
         10        ECHO                                                     ~15
    9    11        ASSIGN                                                   !4, !3
   10    12        ASSIGN                                                   !5, 0
         13        STRLEN                                           ~20     !4
         14        ASSIGN                                                   !6, ~20
         15      > JMP                                                      ->25
   11    16    >   INIT_FCALL                                               'ctype_alpha'
         17        FETCH_DIM_R                                      ~22     !4, !5
         18        SEND_VAL                                                 ~22
         19        DO_ICALL                                         $23     
         20        BOOL_NOT                                         ~24     $23
         21      > JMPZ                                                     ~24, ->24
   12    22    >   ASSIGN_DIM                                               !4, !5
         23        OP_DATA                                                  !1
   10    24    >   PRE_INC                                                  !5
         25    >   IS_SMALLER                                               !5, !6
         26      > JMPNZ                                                    ~27, ->16
   16    27    > > JMP                                                      ->45
   18    28    >   ROPE_INIT                                     3  ~29     '%0AThe+subject+%22'
         29        ROPE_ADD                                      1  ~29     ~29, !0
         30        ROPE_END                                      2  ~28     ~29, '%22+occurs+at+position+'
         31        ECHO                                                     ~28
         32        ADD                                              ~31     !7, 1
         33        ECHO                                                     ~31
   19    34        ASSIGN                                                   !5, 0
         35        ADD                                              ~33     !7, 1
         36        STRLEN                                           ~34     !0
         37        ADD                                              ~35     ~33, ~34
         38        ASSIGN                                                   !6, ~35
         39      > JMP                                                      ->43
   20    40    >   ASSIGN_DIM                                               !4, !5
         41        OP_DATA                                                  !1
   19    42        PRE_INC                                                  !5
         43    >   IS_SMALLER_OR_EQUAL                                      !5, !6
         44      > JMPNZ                                                    ~39, ->40
   16    45    >   INIT_FCALL                                               'strpos'
         46        SEND_VAR                                                 !4
         47        SEND_VAR                                                 !2
         48        DO_ICALL                                         $40     
         49        ASSIGN                                           ~41     !7, $40
         50        TYPE_CHECK                                  1018          ~41
         51      > JMPNZ                                                    ~42, ->28
   22    52    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
182.45 ms | 1400 KiB | 17 Q