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; var_dump($i,$best,$bestCount);
based on uJd9E
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/dQ7Qi
function name:  (null)
number of ops:  36
compiled vars:  !0 = $s, !1 = $n, !2 = $a, !3 = $b, !4 = $c, !5 = $d, !6 = $i, !7 = $best, !8 = $bestCount
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   QM_ASSIGN                                                !0
   4     1        QM_ASSIGN                                                !1
   6     2        QM_ASSIGN                                        $11     !4
         3        QM_ASSIGN                                        $12     !3
         4        QM_ASSIGN                                                !2
         5      > JMP                                                      ->8
         6    >   POST_INC                                         ~14     !2
         7        FREE                                                     ~14
         8    >   BEGIN_SILENCE                                    ~15     
         9        INIT_FCALL                                               'substr_count'
        10        SEND_VAR                                                 !0
        11        SEND_VAL                                                 1
        12        SEND_VAR                                                 !2
        13        SEND_VAR                                                 !1
        14        DO_ICALL                                         $16     
        15        END_SILENCE                                              ~15
        16        QM_ASSIGN                                        $17     !5
        17        IS_SMALLER_OR_EQUAL                              ~18     !4, $17
        18      > JMPZ_EX                                          ~18     ~18, ->24
        19    >   QM_ASSIGN                                        $19     !3
        20      > JMPZ_EX                                          ~20     $19, ->23
        21    >   QM_ASSIGN                                        $21     !4
        22        BOOL                                             ~20     $21
        23    >   BOOL                                             ~18     ~20
        24    > > JMPNZ_EX                                         ~18     ~18, ->28
        25    >   STRLEN                                           ~22     !0
        26        IS_SMALLER_OR_EQUAL                              ~23     !2, ~22
        27        BOOL                                             ~18     ~23
        28    > > JMPNZ                                                    ~18, ->6
        29    >   ASSIGN_OBJ                                               !3
   8    30        INIT_FCALL                                               'var_dump'
        31        SEND_VAR                                                 !6
        32        SEND_VAR                                                 !7
        33        SEND_VAR                                                 !8
        34        DO_ICALL                                                 
        35      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.4.0