3v4l.org

run code in 200+ PHP versions simultaneously
<?php $s = "01001010101101111011101001010100010101101010101010101101101010010110110110"; $n = 10; for($a=$b=$c=0;(($d=@substr_count($s,1,$a,$n))>$c&&(($b=$a)&&($c=$d)))||$a<strlen($s);$a++);echo $b;
based on dQ7Qi
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
2 jumps found. (Code = 46) Position 1 = 19, Position 2 = 24
Branch analysis from position: 19
2 jumps found. (Code = 46) Position 1 = 21, Position 2 = 23
Branch analysis from position: 21
2 jumps found. (Code = 47) Position 1 = 25, Position 2 = 28
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 6
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 46) Position 1 = 19, Position 2 = 24
Branch analysis from position: 19
Branch analysis from position: 24
Branch analysis from position: 28
Branch analysis from position: 23
Branch analysis from position: 24
filename:       /in/J4vqa
function name:  (null)
number of ops:  31
compiled vars:  !0 = $s, !1 = $n, !2 = $a, !3 = $b, !4 = $c, !5 = $d
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   QM_ASSIGN                                                !0
   4     1        QM_ASSIGN                                                !1
   6     2        QM_ASSIGN                                        $8      !4
         3        QM_ASSIGN                                        $9      !3
         4        QM_ASSIGN                                                !2
         5      > JMP                                                      ->8
         6    >   POST_INC                                         ~11     !2
         7        FREE                                                     ~11
         8    >   BEGIN_SILENCE                                    ~12     
         9        INIT_FCALL                                               'substr_count'
        10        SEND_VAR                                                 !0
        11        SEND_VAL                                                 1
        12        SEND_VAR                                                 !2
        13        SEND_VAR                                                 !1
        14        DO_ICALL                                         $13     
        15        END_SILENCE                                              ~12
        16        QM_ASSIGN                                        $14     !5
        17        IS_SMALLER_OR_EQUAL                              ~15     !4, $14
        18      > JMPZ_EX                                          ~15     ~15, ->24
        19    >   QM_ASSIGN                                        $16     !3
        20      > JMPZ_EX                                          ~17     $16, ->23
        21    >   QM_ASSIGN                                        $18     !4
        22        BOOL                                             ~17     $18
        23    >   BOOL                                             ~15     ~17
        24    > > JMPNZ_EX                                         ~15     ~15, ->28
        25    >   STRLEN                                           ~19     !0
        26        IS_SMALLER_OR_EQUAL                              ~20     !2, ~19
        27        BOOL                                             ~15     ~20
        28    > > JMPNZ                                                    ~15, ->6
        29    >   ASSIGN_OBJ                                               !3
        30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.4.0