3v4l.org

run code in 300+ PHP versions simultaneously
<?php $BRANCHING_PROFILE = "09. Reading Comprehension - Post Test"; if (preg_match('(Reading Comprehension)' , $BRANCHING_PROFILE ) === 1) { $code='AC2'; } else if (preg_match('/Sentence Skills/i' ,$BRANCHING_PROFILE) === 1) { $code='AC1'; } else if (preg_match('/Arithmetic/i', $BRANCHING_PROFILE) === 1) { $code='AC5'; } else if (preg_match('/Elementary Algebra/i', $BRANCHING_PROFILE) === 1) { $code='AC6'; } else if (preg_match('/College Level Math/i', $BRANCHING_PROFILE) === 1) { $code='AC7'; } if (preg_match('(Reading Comprehension - Post Test)', $BRANCHING_PROFILE) === 1) { $code='PA2'; } else if (preg_match('/Sentence Skills - Post Test/i', $BRANCHING_PROFILE) === 1) { $code='PA1'; } else if (preg_match('/Arithmetic - Post Test/i', $BRANCHING_PROFILE) === 1) { $code='PA5'; } else if (preg_match('/Elementary Algebra - Post Test/i', $BRANCHING_PROFILE) === 1) { $code='PA6'; } else if (preg_match('/College Level Math - Post Test/i', $BRANCHING_PROFILE) === 1) { $code='PA7'; } var_dump(preg_match('(Reading Comprehension - Post Test)', $BRANCHING_PROFILE)); echo "Branching Profile: " . $BRANCHING_PROFILE . "\n\r"; echo "Code: " . $code;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 40
Branch analysis from position: 40
2 jumps found. (Code = 43) Position 1 = 46, Position 2 = 48
Branch analysis from position: 46
1 jumps found. (Code = 42) Position 1 = 79
Branch analysis from position: 79
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 48
2 jumps found. (Code = 43) Position 1 = 54, Position 2 = 56
Branch analysis from position: 54
1 jumps found. (Code = 42) Position 1 = 79
Branch analysis from position: 79
Branch analysis from position: 56
2 jumps found. (Code = 43) Position 1 = 62, Position 2 = 64
Branch analysis from position: 62
1 jumps found. (Code = 42) Position 1 = 79
Branch analysis from position: 79
Branch analysis from position: 64
2 jumps found. (Code = 43) Position 1 = 70, Position 2 = 72
Branch analysis from position: 70
1 jumps found. (Code = 42) Position 1 = 79
Branch analysis from position: 79
Branch analysis from position: 72
2 jumps found. (Code = 43) Position 1 = 78, Position 2 = 79
Branch analysis from position: 78
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 79
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 17
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 40
Branch analysis from position: 40
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 25
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 40
Branch analysis from position: 40
Branch analysis from position: 25
2 jumps found. (Code = 43) Position 1 = 31, Position 2 = 33
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 40
Branch analysis from position: 40
Branch analysis from position: 33
2 jumps found. (Code = 43) Position 1 = 39, Position 2 = 40
Branch analysis from position: 39
2 jumps found. (Code = 43) Position 1 = 46, Position 2 = 48
Branch analysis from position: 46
Branch analysis from position: 48
Branch analysis from position: 40
filename:       /in/3pUZX
function name:  (null)
number of ops:  92
compiled vars:  !0 = $BRANCHING_PROFILE, !1 = $code
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '09.+Reading+Comprehension+-+Post+Test'
    3     1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%28Reading+Comprehension%29'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $3      
          5        IS_IDENTICAL                                             $3, 1
          6      > JMPZ                                                     ~4, ->9
    5     7    >   ASSIGN                                                   !1, 'AC2'
    3     8      > JMP                                                      ->40
    7     9    >   INIT_FCALL                                               'preg_match'
         10        SEND_VAL                                                 '%2FSentence+Skills%2Fi'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $6      
         13        IS_IDENTICAL                                             $6, 1
         14      > JMPZ                                                     ~7, ->17
    9    15    >   ASSIGN                                                   !1, 'AC1'
    7    16      > JMP                                                      ->40
   11    17    >   INIT_FCALL                                               'preg_match'
         18        SEND_VAL                                                 '%2FArithmetic%2Fi'
         19        SEND_VAR                                                 !0
         20        DO_ICALL                                         $9      
         21        IS_IDENTICAL                                             $9, 1
         22      > JMPZ                                                     ~10, ->25
   13    23    >   ASSIGN                                                   !1, 'AC5'
   11    24      > JMP                                                      ->40
   15    25    >   INIT_FCALL                                               'preg_match'
         26        SEND_VAL                                                 '%2FElementary+Algebra%2Fi'
         27        SEND_VAR                                                 !0
         28        DO_ICALL                                         $12     
         29        IS_IDENTICAL                                             $12, 1
         30      > JMPZ                                                     ~13, ->33
   17    31    >   ASSIGN                                                   !1, 'AC6'
   15    32      > JMP                                                      ->40
   19    33    >   INIT_FCALL                                               'preg_match'
         34        SEND_VAL                                                 '%2FCollege+Level+Math%2Fi'
         35        SEND_VAR                                                 !0
         36        DO_ICALL                                         $15     
         37        IS_IDENTICAL                                             $15, 1
         38      > JMPZ                                                     ~16, ->40
   21    39    >   ASSIGN                                                   !1, 'AC7'
   23    40    >   INIT_FCALL                                               'preg_match'
         41        SEND_VAL                                                 '%28Reading+Comprehension+-+Post+Test%29'
         42        SEND_VAR                                                 !0
         43        DO_ICALL                                         $18     
         44        IS_IDENTICAL                                             $18, 1
         45      > JMPZ                                                     ~19, ->48
   25    46    >   ASSIGN                                                   !1, 'PA2'
   23    47      > JMP                                                      ->79
   27    48    >   INIT_FCALL                                               'preg_match'
         49        SEND_VAL                                                 '%2FSentence+Skills+-+Post+Test%2Fi'
         50        SEND_VAR                                                 !0
         51        DO_ICALL                                         $21     
         52        IS_IDENTICAL                                             $21, 1
         53      > JMPZ                                                     ~22, ->56
   29    54    >   ASSIGN                                                   !1, 'PA1'
   27    55      > JMP                                                      ->79
   31    56    >   INIT_FCALL                                               'preg_match'
         57        SEND_VAL                                                 '%2FArithmetic+-+Post+Test%2Fi'
         58        SEND_VAR                                                 !0
         59        DO_ICALL                                         $24     
         60        IS_IDENTICAL                                             $24, 1
         61      > JMPZ                                                     ~25, ->64
   33    62    >   ASSIGN                                                   !1, 'PA5'
   31    63      > JMP                                                      ->79
   35    64    >   INIT_FCALL                                               'preg_match'
         65        SEND_VAL                                                 '%2FElementary+Algebra+-+Post+Test%2Fi'
         66        SEND_VAR                                                 !0
         67        DO_ICALL                                         $27     
         68        IS_IDENTICAL                                             $27, 1
         69      > JMPZ                                                     ~28, ->72
   37    70    >   ASSIGN                                                   !1, 'PA6'
   35    71      > JMP                                                      ->79
   39    72    >   INIT_FCALL                                               'preg_match'
         73        SEND_VAL                                                 '%2FCollege+Level+Math+-+Post+Test%2Fi'
         74        SEND_VAR                                                 !0
         75        DO_ICALL                                         $30     
         76        IS_IDENTICAL                                             $30, 1
         77      > JMPZ                                                     ~31, ->79
   41    78    >   ASSIGN                                                   !1, 'PA7'
   44    79    >   INIT_FCALL                                               'var_dump'
         80        INIT_FCALL                                               'preg_match'
         81        SEND_VAL                                                 '%28Reading+Comprehension+-+Post+Test%29'
         82        SEND_VAR                                                 !0
         83        DO_ICALL                                         $33     
         84        SEND_VAR                                                 $33
         85        DO_ICALL                                                 
   45    86        CONCAT                                           ~35     'Branching+Profile%3A+', !0
         87        CONCAT                                           ~36     ~35, '%0A%0D'
         88        ECHO                                                     ~36
   46    89        CONCAT                                           ~37     'Code%3A+', !1
         90        ECHO                                                     ~37
         91      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.2 ms | 1010 KiB | 15 Q