3v4l.org

run code in 300+ PHP versions simultaneously
<?php function is_str_lowercase($str1) { for ($sc = 0; $sc < strlen($str1); $sc++) { if (ord($str1[$sc]) >= ord('A') && ord($str1[$sc]) <= ord('Z')) { return false; } } return true; } var_dump(is_str_lowercase('abc def ghi')); var_dump(is_str_lowercase('abc dEf ghi')); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/J6DL3
function name:  (null)
number of ops:  13
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'is_str_lowercase'
          2        SEND_VAL                                                 'abc+def+ghi'
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
   13     6        INIT_FCALL                                               'var_dump'
          7        INIT_FCALL                                               'is_str_lowercase'
          8        SEND_VAL                                                 'abc+dEf+ghi'
          9        DO_FCALL                                      0  $2      
         10        SEND_VAR                                                 $2
         11        DO_ICALL                                                 
   14    12      > RETURN                                                   1

Function is_str_lowercase:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 3
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 46) Position 1 = 9, Position 2 = 15
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 17
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 3
Branch analysis from position: 21
Branch analysis from position: 3
Branch analysis from position: 15
filename:       /in/J6DL3
function name:  is_str_lowercase
number of ops:  23
compiled vars:  !0 = $str1, !1 = $sc
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    4     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->18
    5     3    >   INIT_FCALL                                               'ord'
          4        FETCH_DIM_R                                      ~3      !0, !1
          5        SEND_VAL                                                 ~3
          6        DO_ICALL                                         $4      
          7        IS_SMALLER_OR_EQUAL                              ~5      65, $4
          8      > JMPZ_EX                                          ~5      ~5, ->15
    6     9    >   INIT_FCALL                                               'ord'
         10        FETCH_DIM_R                                      ~6      !0, !1
         11        SEND_VAL                                                 ~6
         12        DO_ICALL                                         $7      
         13        IS_SMALLER_OR_EQUAL                              ~8      $7, 90
         14        BOOL                                             ~5      ~8
         15    > > JMPZ                                                     ~5, ->17
    7    16    > > RETURN                                                   <false>
    4    17    >   PRE_INC                                                  !1
         18    >   STRLEN                                           ~10     !0
         19        IS_SMALLER                                               !1, ~10
         20      > JMPNZ                                                    ~11, ->3
   10    21    > > RETURN                                                   <true>
   11    22*     > RETURN                                                   null

End of function is_str_lowercase

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.82 ms | 1403 KiB | 19 Q