3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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'; } }
based on m0Eaj
Output for 5.6.0 - 7.3.0alpha1
Warning: Illegal offset type in /in/CjZCK on line 17 Notice: Undefined variable: BRANCHING_PROFILE in /in/CjZCK on line 25 Notice: Undefined variable: BRANCHING_PROFILE in /in/CjZCK on line 29 Notice: Undefined variable: BRANCHING_PROFILE in /in/CjZCK on line 33 Notice: Undefined variable: BRANCHING_PROFILE in /in/CjZCK on line 37 Notice: Undefined variable: BRANCHING_PROFILE in /in/CjZCK on line 41 Notice: Undefined variable: BRANCHING_PROFILE in /in/CjZCK on line 45 Notice: Undefined variable: BRANCHING_PROFILE in /in/CjZCK on line 49 Notice: Undefined variable: BRANCHING_PROFILE in /in/CjZCK on line 53 Notice: Undefined variable: BRANCHING_PROFILE in /in/CjZCK on line 57 Notice: Undefined variable: BRANCHING_PROFILE in /in/CjZCK on line 61 Notice: Undefined variable: BRANCHING_PROFILE in /in/CjZCK on line 66 Notice: Undefined variable: BRANCHING_PROFILE in /in/CjZCK on line 70 Notice: Undefined variable: BRANCHING_PROFILE in /in/CjZCK on line 74 Notice: Undefined variable: BRANCHING_PROFILE in /in/CjZCK on line 78 Notice: Undefined variable: BRANCHING_PROFILE in /in/CjZCK on line 82 Notice: Undefined variable: BRANCHING_PROFILE in /in/CjZCK on line 86 Notice: Undefined variable: BRANCHING_PROFILE in /in/CjZCK on line 90 Notice: Undefined variable: BRANCHING_PROFILE in /in/CjZCK on line 94 Notice: Undefined variable: BRANCHING_PROFILE in /in/CjZCK on line 98 Notice: Undefined variable: BRANCHING_PROFILE in /in/CjZCK on line 102 Warning: Illegal offset type in /in/CjZCK on line 17 Notice: Undefined variable: BRANCHING_PROFILE in /in/CjZCK on line 25 Notice: Undefined variable: BRANCHING_PROFILE in /in/CjZCK on line 29 Notice: Undefined variable: BRANCHING_PROFILE in /in/CjZCK on line 33 Notice: Undefined variable: BRANCHING_PROFILE in /in/CjZCK on line 37 Notice: Undefined variable: BRANCHING_PROFILE in /in/CjZCK on line 41 Notice: Undefined variable: BRANCHING_PROFILE in /in/CjZCK on line 45 Notice: Undefined variable: BRANCHING_PROFILE in /in/CjZCK on line 49 Notice: Undefined variable: BRANCHING_PROFILE in /in/CjZCK on line 53 Notice: Undefined variable: BRANCHING_PROFILE in /in/CjZCK on line 57 Notice: Undefined variable: BRANCHING_PROFILE in /in/CjZCK on line 61 Notice: Undefined variable: BRANCHING_PROFILE in /in/CjZCK on line 66 Notice: Undefined variable: BRANCHING_PROFILE in /in/CjZCK on line 70 Notice: Undefined variable: BRANCHING_PROFILE in /in/CjZCK on line 74 Notice: Undefined variable: BRANCHING_PROFILE in /in/CjZCK on line 78 Notice: Undefined variable: BRANCHING_PROFILE in /in/CjZCK on line 82 Notice: Undefined variable: BRANCHING_PROFILE in /in/CjZCK on line 86 Notice: Undefined variable: BRANCHING_PROFILE in /in/CjZCK on line 90 Notice: Undefined variable: BRANCHING_PROFILE in /in/CjZCK on line 94 Notice: Undefined variable: BRANCHING_PROFILE in /in/CjZCK on line 98 Notice: Undefined variable: BRANCHING_PROFILE in /in/CjZCK on line 102