3v4l.org

run code in 300+ PHP versions simultaneously
<?php const CODE_MAP = [ 'Reading Comprehension' => 2, 'Elementary Algebra' => 6, 'College Level Math' => 7, 'Sentence Skills' => 1, 'Arithmetic' => 5, ]; const POST_TEST = 'Post Test'; const BASIC_PREFIX = 'AC'; const POST_PREFIX = 'PA'; $BRANCHING_PROFILE = "09. Reading Comprehension - Post Test"; $code = null; foreach (CODE_MAP as $search => $subCode) { if (stripos($BRANCHING_PROFILE, $search) === false) { continue; } $prefix = stripos($BRANCHING_PROFILE, POST_TEST) === false ? BASIC_PREFIX : POST_PREFIX; $code = $prefix . $subCode; break; } var_dump($code);
Output for git.master, git.master_jit, rfc.property-hooks
string(3) "PA2"

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
14.1 ms | 405 KiB | 5 Q