3v4l.org

run code in 300+ PHP versions simultaneously
<?php $accuplacer_assoc = [ array( "Reading Comprehension" => "70", "Branching Profile" => "Reading Comprehension - Post Test" ), array( "Elementary Algebra" => "83", "Branching Profile" => "Math - Post Test" ), ]; foreach ($accuplacer_assoc as $index) { if (!empty($accuplacer_assoc[$index]['Branching Profile'])) { var_dump("checking to see if accuplacer_assoc[index][i] is empty: " . !empty($accuplacer_assoc[$index][$i]) . "<br /><br />"); break; } else { if (preg_match("/Reading Comprehension - Post Test/i", $BRANCHING_PROFILE) === 1) { $code='PA2'; } else if (preg_match("/^Sentence Skills - Post Test$/i", $BRANCHING_PROFILE) === 1) { $code='PA1'; } else if (preg_match("/^Math - 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'; } else if (preg_match("/^Reading Comprehension$/i" , $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/i", $BRANCHING_PROFILE) === 1) { $code='PA2'; } else if (preg_match("/^Sentence Skills - Post Test$/i", $BRANCHING_PROFILE) === 1) { $code='PA1'; } else if ((preg_match("/^Math - Post Test$/i", $BRANCHING_PROFILE) === 1) && (preg_match("/^Arithmetic/i", $accuplacer_assoc[$index]['Arithmetic']) === 1)) { $code='PA5'; } else if ((preg_match("/^Math - Post Test$/i", $BRANCHING_PROFILE) === 1) && (preg_match("/^Elementary Algebra/i", $accuplacer_assoc[$index]['Elementary Algebra']) === 1)) { $code='PA6'; } else if ((preg_match("/^Math - Post Test$/i", $BRANCHING_PROFILE) === 1) && (preg_match("/^College Level Math/i", $accuplacer_assoc[$index]['College Level Math']) === 1)) { $code='PA7'; } else if (preg_match("/^Reading Comprehension$/i" , $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'; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 203
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 203
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 17
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 203
Branch analysis from position: 203
1 jumps found. (Code = 62) Position 1 = -2
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 = 96
Branch analysis from position: 96
2 jumps found. (Code = 43) Position 1 = 102, Position 2 = 104
Branch analysis from position: 102
1 jumps found. (Code = 42) Position 1 = 202
Branch analysis from position: 202
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 104
2 jumps found. (Code = 43) Position 1 = 110, Position 2 = 112
Branch analysis from position: 110
1 jumps found. (Code = 42) Position 1 = 202
Branch analysis from position: 202
Branch analysis from position: 112
2 jumps found. (Code = 46) Position 1 = 118, Position 2 = 126
Branch analysis from position: 118
2 jumps found. (Code = 43) Position 1 = 127, Position 2 = 129
Branch analysis from position: 127
1 jumps found. (Code = 42) Position 1 = 202
Branch analysis from position: 202
Branch analysis from position: 129
2 jumps found. (Code = 46) Position 1 = 135, Position 2 = 143
Branch analysis from position: 135
2 jumps found. (Code = 43) Position 1 = 144, Position 2 = 146
Branch analysis from position: 144
1 jumps found. (Code = 42) Position 1 = 202
Branch analysis from position: 202
Branch analysis from position: 146
2 jumps found. (Code = 46) Position 1 = 152, Position 2 = 160
Branch analysis from position: 152
2 jumps found. (Code = 43) Position 1 = 161, Position 2 = 163
Branch analysis from position: 161
1 jumps found. (Code = 42) Position 1 = 202
Branch analysis from position: 202
Branch analysis from position: 163
2 jumps found. (Code = 43) Position 1 = 169, Position 2 = 171
Branch analysis from position: 169
1 jumps found. (Code = 42) Position 1 = 202
Branch analysis from position: 202
Branch analysis from position: 171
2 jumps found. (Code = 43) Position 1 = 177, Position 2 = 179
Branch analysis from position: 177
1 jumps found. (Code = 42) Position 1 = 202
Branch analysis from position: 202
Branch analysis from position: 179
2 jumps found. (Code = 43) Position 1 = 185, Position 2 = 187
Branch analysis from position: 185
1 jumps found. (Code = 42) Position 1 = 202
Branch analysis from position: 202
Branch analysis from position: 187
2 jumps found. (Code = 43) Position 1 = 193, Position 2 = 195
Branch analysis from position: 193
1 jumps found. (Code = 42) Position 1 = 202
Branch analysis from position: 202
Branch analysis from position: 195
2 jumps found. (Code = 43) Position 1 = 201, Position 2 = 202
Branch analysis from position: 201
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 202
Branch analysis from position: 160
Branch analysis from position: 143
Branch analysis from position: 126
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 = 96
Branch analysis from position: 96
Branch analysis from position: 33
2 jumps found. (Code = 43) Position 1 = 39, Position 2 = 41
Branch analysis from position: 39
1 jumps found. (Code = 42) Position 1 = 96
Branch analysis from position: 96
Branch analysis from position: 41
2 jumps found. (Code = 43) Position 1 = 47, Position 2 = 49
Branch analysis from position: 47
1 jumps found. (Code = 42) Position 1 = 96
Branch analysis from position: 96
Branch analysis from position: 49
2 jumps found. (Code = 43) Position 1 = 55, Position 2 = 57
Branch analysis from position: 55
1 jumps found. (Code = 42) Position 1 = 96
Branch analysis from position: 96
Branch analysis from position: 57
2 jumps found. (Code = 43) Position 1 = 63, Position 2 = 65
Branch analysis from position: 63
1 jumps found. (Code = 42) Position 1 = 96
Branch analysis from position: 96
Branch analysis from position: 65
2 jumps found. (Code = 43) Position 1 = 71, Position 2 = 73
Branch analysis from position: 71
1 jumps found. (Code = 42) Position 1 = 96
Branch analysis from position: 96
Branch analysis from position: 73
2 jumps found. (Code = 43) Position 1 = 79, Position 2 = 81
Branch analysis from position: 79
1 jumps found. (Code = 42) Position 1 = 96
Branch analysis from position: 96
Branch analysis from position: 81
2 jumps found. (Code = 43) Position 1 = 87, Position 2 = 89
Branch analysis from position: 87
1 jumps found. (Code = 42) Position 1 = 96
Branch analysis from position: 96
Branch analysis from position: 89
2 jumps found. (Code = 43) Position 1 = 95, Position 2 = 96
Branch analysis from position: 95
2 jumps found. (Code = 43) Position 1 = 102, Position 2 = 104
Branch analysis from position: 102
Branch analysis from position: 104
Branch analysis from position: 96
Branch analysis from position: 203
Branch analysis from position: 203
filename:       /in/CjZCK
function name:  (null)
number of ops:  205
compiled vars:  !0 = $accuplacer_assoc, !1 = $index, !2 = $i, !3 = $BRANCHING_PROFILE, !4 = $code
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   15     1      > FE_RESET_R                                       $6      !0, ->203
          2    > > FE_FETCH_R                                               $6, !1, ->203
   17     3    >   FETCH_DIM_IS                                     ~7      !0, !1
          4        ISSET_ISEMPTY_DIM_OBJ                         1  ~8      ~7, 'Branching+Profile'
          5        BOOL_NOT                                         ~9      ~8
          6      > JMPZ                                                     ~9, ->17
   19     7    >   INIT_FCALL                                               'var_dump'
          8        FETCH_DIM_IS                                     ~10     !0, !1
          9        ISSET_ISEMPTY_DIM_OBJ                         1  ~11     ~10, !2
         10        BOOL_NOT                                         ~12     ~11
         11        CONCAT                                           ~13     'checking+to+see+if+accuplacer_assoc%5Bindex%5D%5Bi%5D+is+empty%3A+', ~12
         12        CONCAT                                           ~14     ~13, '%3Cbr+%0A%2F%3E%3Cbr+%2F%3E'
         13        SEND_VAL                                                 ~14
         14        DO_ICALL                                                 
   21    15      > JMP                                                      ->203
         16*       JMP                                                      ->96
   25    17    >   INIT_FCALL                                               'preg_match'
         18        SEND_VAL                                                 '%2FReading+Comprehension+-+Post+Test%2Fi'
         19        SEND_VAR                                                 !3
         20        DO_ICALL                                         $16     
         21        IS_IDENTICAL                                             $16, 1
         22      > JMPZ                                                     ~17, ->25
   27    23    >   ASSIGN                                                   !4, 'PA2'
         24      > JMP                                                      ->96
   29    25    >   INIT_FCALL                                               'preg_match'
         26        SEND_VAL                                                 '%2F%5ESentence+Skills+-+Post+Test%24%2Fi'
         27        SEND_VAR                                                 !3
         28        DO_ICALL                                         $19     
         29        IS_IDENTICAL                                             $19, 1
         30      > JMPZ                                                     ~20, ->33
   31    31    >   ASSIGN                                                   !4, 'PA1'
         32      > JMP                                                      ->96
   33    33    >   INIT_FCALL                                               'preg_match'
         34        SEND_VAL                                                 '%2F%5EMath+-+Post+Test%24%2Fi'
         35        SEND_VAR                                                 !3
         36        DO_ICALL                                         $22     
         37        IS_IDENTICAL                                             $22, 1
         38      > JMPZ                                                     ~23, ->41
   35    39    >   ASSIGN                                                   !4, 'PA5'
         40      > JMP                                                      ->96
   37    41    >   INIT_FCALL                                               'preg_match'
         42        SEND_VAL                                                 '%2F%5EElementary+Algebra+-+Post+Test%24%2Fi'
         43        SEND_VAR                                                 !3
         44        DO_ICALL                                         $25     
         45        IS_IDENTICAL                                             $25, 1
         46      > JMPZ                                                     ~26, ->49
   39    47    >   ASSIGN                                                   !4, 'PA6'
         48      > JMP                                                      ->96
   41    49    >   INIT_FCALL                                               'preg_match'
         50        SEND_VAL                                                 '%2F%5ECollege+Level+Math+-+Post+Test%24%2Fi'
         51        SEND_VAR                                                 !3
         52        DO_ICALL                                         $28     
         53        IS_IDENTICAL                                             $28, 1
         54      > JMPZ                                                     ~29, ->57
   43    55    >   ASSIGN                                                   !4, 'PA7'
         56      > JMP                                                      ->96
   45    57    >   INIT_FCALL                                               'preg_match'
         58        SEND_VAL                                                 '%2F%5EReading+Comprehension%24%2Fi'
         59        SEND_VAR                                                 !3
         60        DO_ICALL                                         $31     
         61        IS_IDENTICAL                                             $31, 1
         62      > JMPZ                                                     ~32, ->65
   47    63    >   ASSIGN                                                   !4, 'AC2'
         64      > JMP                                                      ->96
   49    65    >   INIT_FCALL                                               'preg_match'
         66        SEND_VAL                                                 '%2F%5ESentence+Skills%24%2Fi'
         67        SEND_VAR                                                 !3
         68        DO_ICALL                                         $34     
         69        IS_IDENTICAL                                             $34, 1
         70      > JMPZ                                                     ~35, ->73
   51    71    >   ASSIGN                                                   !4, 'AC1'
         72      > JMP                                                      ->96
   53    73    >   INIT_FCALL                                               'preg_match'
         74        SEND_VAL                                                 '%2F%5EArithmetic%24%2Fi'
         75        SEND_VAR                                                 !3
         76        DO_ICALL                                         $37     
         77        IS_IDENTICAL                                             $37, 1
         78      > JMPZ                                                     ~38, ->81
   55    79    >   ASSIGN                                                   !4, 'AC5'
         80      > JMP                                                      ->96
   57    81    >   INIT_FCALL                                               'preg_match'
         82        SEND_VAL                                                 '%2F%5EElementary+Algebra%24%2Fi'
         83        SEND_VAR                                                 !3
         84        DO_ICALL                                         $40     
         85        IS_IDENTICAL                                             $40, 1
         86      > JMPZ                                                     ~41, ->89
   59    87    >   ASSIGN                                                   !4, 'AC6'
         88      > JMP                                                      ->96
   61    89    >   INIT_FCALL                                               'preg_match'
         90        SEND_VAL                                                 '%2F%5ECollege+Level+Math%24%2Fi'
         91        SEND_VAR                                                 !3
         92        DO_ICALL                                         $43     
         93        IS_IDENTICAL                                             $43, 1
         94      > JMPZ                                                     ~44, ->96
   63    95    >   ASSIGN                                                   !4, 'AC7'
   66    96    >   INIT_FCALL                                               'preg_match'
         97        SEND_VAL                                                 '%2FReading+Comprehension+-+Post+Test%2Fi'
         98        SEND_VAR                                                 !3
         99        DO_ICALL                                         $46     
        100        IS_IDENTICAL                                             $46, 1
        101      > JMPZ                                                     ~47, ->104
   68   102    >   ASSIGN                                                   !4, 'PA2'
        103      > JMP                                                      ->202
   70   104    >   INIT_FCALL                                               'preg_match'
        105        SEND_VAL                                                 '%2F%5ESentence+Skills+-+Post+Test%24%2Fi'
        106        SEND_VAR                                                 !3
        107        DO_ICALL                                         $49     
        108        IS_IDENTICAL                                             $49, 1
        109      > JMPZ                                                     ~50, ->112
   72   110    >   ASSIGN                                                   !4, 'PA1'
        111      > JMP                                                      ->202
   74   112    >   INIT_FCALL                                               'preg_match'
        113        SEND_VAL                                                 '%2F%5EMath+-+Post+Test%24%2Fi'
        114        SEND_VAR                                                 !3
        115        DO_ICALL                                         $52     
        116        IS_IDENTICAL                                     ~53     $52, 1
        117      > JMPZ_EX                                          ~53     ~53, ->126
        118    >   INIT_FCALL                                               'preg_match'
        119        SEND_VAL                                                 '%2F%5EArithmetic%2Fi'
        120        FETCH_DIM_R                                      ~54     !0, !1
        121        FETCH_DIM_R                                      ~55     ~54, 'Arithmetic'
        122        SEND_VAL                                                 ~55
        123        DO_ICALL                                         $56     
        124        IS_IDENTICAL                                     ~57     $56, 1
        125        BOOL                                             ~53     ~57
        126    > > JMPZ                                                     ~53, ->129
   76   127    >   ASSIGN                                                   !4, 'PA5'
        128      > JMP                                                      ->202
   78   129    >   INIT_FCALL                                               'preg_match'
        130        SEND_VAL                                                 '%2F%5EMath+-+Post+Test%24%2Fi'
        131        SEND_VAR                                                 !3
        132        DO_ICALL                                         $59     
        133        IS_IDENTICAL                                     ~60     $59, 1
        134      > JMPZ_EX                                          ~60     ~60, ->143
        135    >   INIT_FCALL                                               'preg_match'
        136        SEND_VAL                                                 '%2F%5EElementary+Algebra%2Fi'
        137        FETCH_DIM_R                                      ~61     !0, !1
        138        FETCH_DIM_R                                      ~62     ~61, 'Elementary+Algebra'
        139        SEND_VAL                                                 ~62
        140        DO_ICALL                                         $63     
        141        IS_IDENTICAL                                     ~64     $63, 1
        142        BOOL                                             ~60     ~64
        143    > > JMPZ                                                     ~60, ->146
   80   144    >   ASSIGN                                                   !4, 'PA6'
        145      > JMP                                                      ->202
   82   146    >   INIT_FCALL                                               'preg_match'
        147        SEND_VAL                                                 '%2F%5EMath+-+Post+Test%24%2Fi'
        148        SEND_VAR                                                 !3
        149        DO_ICALL                                         $66     
        150        IS_IDENTICAL                                     ~67     $66, 1
        151      > JMPZ_EX                                          ~67     ~67, ->160
        152    >   INIT_FCALL                                               'preg_match'
        153        SEND_VAL                                                 '%2F%5ECollege+Level+Math%2Fi'
        154        FETCH_DIM_R                                      ~68     !0, !1
        155        FETCH_DIM_R                                      ~69     ~68, 'College+Level+Math'
        156        SEND_VAL                                                 ~69
        157        DO_ICALL                                         $70     
        158        IS_IDENTICAL                                     ~71     $70, 1
        159        BOOL                                             ~67     ~71
        160    > > JMPZ                                                     ~67, ->163
   84   161    >   ASSIGN                                                   !4, 'PA7'
        162      > JMP                                                      ->202
   86   163    >   INIT_FCALL                                               'preg_match'
        164        SEND_VAL                                                 '%2F%5EReading+Comprehension%24%2Fi'
        165        SEND_VAR                                                 !3
        166        DO_ICALL                                         $73     
        167        IS_IDENTICAL                                             $73, 1
        168      > JMPZ                                                     ~74, ->171
   88   169    >   ASSIGN                                                   !4, 'AC2'
        170      > JMP                                                      ->202
   90   171    >   INIT_FCALL                                               'preg_match'
        172        SEND_VAL                                                 '%2F%5ESentence+Skills%24%2Fi'
        173        SEND_VAR                                                 !3
        174        DO_ICALL                                         $76     
        175        IS_IDENTICAL                                             $76, 1
        176      > JMPZ                                                     ~77, ->179
   92   177    >   ASSIGN                                                   !4, 'AC1'
        178      > JMP                                                      ->202
   94   179    >   INIT_FCALL                                               'preg_match'
        180        SEND_VAL                                                 '%2F%5EArithmetic%24%2Fi'
        181        SEND_VAR                                                 !3
        182        DO_ICALL                                         $79     
        183        IS_IDENTICAL                                             $79, 1
        184      > JMPZ                                                     ~80, ->187
   96   185    >   ASSIGN                                                   !4, 'AC5'
        186      > JMP                                                      ->202
   98   187    >   INIT_FCALL                                               'preg_match'
        188        SEND_VAL                                                 '%2F%5EElementary+Algebra%24%2Fi'
        189        SEND_VAR                                                 !3
        190        DO_ICALL                                         $82     
        191        IS_IDENTICAL                                             $82, 1
        192      > JMPZ                                                     ~83, ->195
  100   193    >   ASSIGN                                                   !4, 'AC6'
        194      > JMP                                                      ->202
  102   195    >   INIT_FCALL                                               'preg_match'
        196        SEND_VAL                                                 '%2F%5ECollege+Level+Math%24%2Fi'
        197        SEND_VAR                                                 !3
        198        DO_ICALL                                         $85     
        199        IS_IDENTICAL                                             $85, 1
        200      > JMPZ                                                     ~86, ->202
  104   201    >   ASSIGN                                                   !4, 'AC7'
   15   202    > > JMP                                                      ->2
        203    >   FE_FREE                                                  $6
  107   204      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.92 ms | 1416 KiB | 17 Q