note 117264 deleted from reserved.variables.argv by cmb

From: Date: Sun, 05 Jan 2020 08:47:26 +0000
Subject: note 117264 deleted from reserved.variables.argv by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-213771@lists.php.net to get a copy of this message
Note Submitter: KRowe ---- Improves on hamboy75's note by providing better support for positional arguments: foreach ($argv as $arg) { $e=explode("=",$arg); if(count($e)==2) $_GET[$e[0]]=$e[1]; else $_GET[]=$e[0]; } var_dump($_GET); Using this modification, arguments without an = are treated as positional (this is not web standard but generally works).

« previous php.notes (#213771) next »