3v4l.org

run code in 500+ PHP versions simultaneously
<?php function chk($a,$b){ mb_regex_encoding('SJIS'); $j=0; $cnt=0; for($i=$a;$i<$b;$i++){ $s=sprintf('%x',$i); $hex = hex2bin($s); if(mb_check_encoding($hex)){ if (!mb_ereg($hex, $hex)){ // echo "$s($hex):NG\n"; $cnt++; } }else{ } $j++; } echo "j:$j\n"; echo "cnt:$cnt\n"; } mb_internal_encoding('SJIS-win'); chk(0xED40,0xFC51);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P56Zg
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   22     0  E >   INIT_FCALL                                                   'mb_internal_encoding'
          1        SEND_VAL                                                     'SJIS-win'
          2        DO_ICALL                                                     
   23     3        INIT_FCALL                                                   'chk'
          4        SEND_VAL                                                     60736
          5        SEND_VAL                                                     64593
          6        DO_FCALL                                          0          
          7      > RETURN                                                       1

Function chk:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
2 jumps found. (Code = 44) Position 1 = 34, Position 2 = 9
Branch analysis from position: 34
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 30
Branch analysis from position: 22
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 29
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
2 jumps found. (Code = 44) Position 1 = 34, Position 2 = 9
Branch analysis from position: 34
Branch analysis from position: 9
Branch analysis from position: 29
Branch analysis from position: 30
filename:       /in/P56Zg
function name:  chk
number of ops:  43
compiled vars:  !0 = $a, !1 = $b, !2 = $j, !3 = $cnt, !4 = $i, !5 = $s, !6 = $hex
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
    4     2        INIT_FCALL                                                   'mb_regex_encoding'
          3        SEND_VAL                                                     'SJIS'
          4        DO_ICALL                                                     
    5     5        ASSIGN                                                       !2, 0
    6     6        ASSIGN                                                       !3, 0
    7     7        ASSIGN                                                       !4, !0
          8      > JMP                                                          ->32
    8     9    >   INIT_FCALL                                                   'sprintf'
         10        SEND_VAL                                                     '%25x'
         11        SEND_VAR                                                     !4
         12        DO_ICALL                                             $11     
         13        ASSIGN                                                       !5, $11
    9    14        INIT_FCALL                                                   'hex2bin'
         15        SEND_VAR                                                     !5
         16        DO_ICALL                                             $13     
         17        ASSIGN                                                       !6, $13
   10    18        INIT_FCALL                                                   'mb_check_encoding'
         19        SEND_VAR                                                     !6
         20        DO_ICALL                                             $15     
         21      > JMPZ                                                         $15, ->30
   11    22    >   INIT_FCALL                                                   'mb_ereg'
         23        SEND_VAR                                                     !6
         24        SEND_VAR                                                     !6
         25        DO_ICALL                                             $16     
         26        BOOL_NOT                                             ~17     $16
         27      > JMPZ                                                         ~17, ->29
   13    28    >   PRE_INC                                                      !3
   10    29    > > JMP                                                          ->30
   17    30    >   PRE_INC                                                      !2
    7    31        PRE_INC                                                      !4
         32    >   IS_SMALLER                                                   !4, !1
         33      > JMPNZ                                                        ~21, ->9
   19    34    >   ROPE_INIT                                         3  ~23     'j%3A'
         35        ROPE_ADD                                          1  ~23     ~23, !2
         36        ROPE_END                                          2  ~22     ~23, '%0A'
         37        ECHO                                                         ~22
   20    38        ROPE_INIT                                         3  ~26     'cnt%3A'
         39        ROPE_ADD                                          1  ~26     ~26, !3
         40        ROPE_END                                          2  ~25     ~26, '%0A'
         41        ECHO                                                         ~25
   21    42      > RETURN                                                       null

End of function chk

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
162.11 ms | 2094 KiB | 20 Q