3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $Requests = (is_array($_POST["requests"]) && count($_POST["requests"]) > 0) ? "µ".implode("µµ", $_POST["requests"])."µ" : array(); if(is_array($Requests)) { $Reqs = $Requests; } elseif(preg_match("/^(µ[^µ~]*~[01]µ)*$/i", $Requests)) { $Reqs = array(); $Requests = explode("µµ", mb_substr($Requests, 1, -1, "UTF-8")); foreach($Requests as $Request) { $Req = explode("~", $Request); $Req[] = array("Subject" => strval($Req[0]), "Active" => intval($Req[1])); } } print_r($Reqs);
Output for 5.3.0 - 7.1.0
Notice: Undefined index: requests in /in/3Cepr on line 2 Array ( )
Output for 4.3.0 - 5.2.17
Notice: Undefined index: requests in /in/3Cepr on line 2 Array ( )