3v4l.org

run code in 300+ PHP versions simultaneously
<?php function isCorrect($string) { if (strlen($string) % 2 === 0) { $start = 0; $string2; for( $i = $start; $i < strlen($string); $i++) { var_dump($string[6]); } return true; } return false; } $string = '({{}})'; isCorrect($string); //var_dump(isCorrect($string)); //var_dump(strlen($string) % 2); //assert(isCorrect('') === true); //assert(isCorrect('()') === true); //assert(isCorrect('{()}') === true); //assert(isCorrect('{()}{}') === true); //assert(isCorrect('(())') === true); //assert(isCorrect('{({({({()})})})}') === true); //assert(isCorrect('{(})') === false);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/S9Uee
function name:  (null)
number of ops:  5
compiled vars:  !0 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   ASSIGN                                                   !0, '%28%7B%7B%7D%7D%29'
   14     1        INIT_FCALL                                               'iscorrect'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0          
   24     4      > RETURN                                                   1

Function iscorrect:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 17
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 8
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 8
Branch analysis from position: 16
Branch analysis from position: 8
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/S9Uee
function name:  isCorrect
number of ops:  19
compiled vars:  !0 = $string, !1 = $start, !2 = $string2, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        STRLEN                                           ~4      !0
          2        MOD                                              ~5      ~4, 2
          3        IS_IDENTICAL                                             ~5, 0
          4      > JMPZ                                                     ~6, ->17
    4     5    >   ASSIGN                                                   !1, 0
    6     6        ASSIGN                                                   !3, !1
          7      > JMP                                                      ->13
    7     8    >   INIT_FCALL                                               'var_dump'
          9        FETCH_DIM_R                                      ~9      !0, 6
         10        SEND_VAL                                                 ~9
         11        DO_ICALL                                                 
    6    12        PRE_INC                                                  !3
         13    >   STRLEN                                           ~12     !0
         14        IS_SMALLER                                               !3, ~12
         15      > JMPNZ                                                    ~13, ->8
    9    16    > > RETURN                                                   <true>
   11    17    > > RETURN                                                   <false>
   12    18*     > RETURN                                                   null

End of function iscorrect

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.1 ms | 1399 KiB | 16 Q