note 110870 added to function.str-split

From: Date: Mon, 17 Dec 2012 18:56:20 +0000
Subject: note 110870 added to function.str-split
Groups: php.notes 
Request: Send a blank email to php-notes+get-192569@lists.php.net to get a copy of this message
/* Simple example of defining an array as a class const string and then converting on the fly to an array. */ class ConstToArray { const ALPHA_STR = "A|B|C|D|E"; } $CLASS_NAME = 'ConstToArray'; $arrayFromConst = explode('|',$CLASS_NAME::ALPHA_STR); print_r($arrayFromConst); ---- Server IP: 69.147.83.199 Probable Submitter: 216.121.163.172 ---- Manual Page -- http://php.net/manual/en/function.str-split.php Edit -- https://master.php.net/note/edit/110870 Del: integrated -- https://master.php.net/note/delete/110870/integrated Del: useless -- https://master.php.net/note/delete/110870/useless Del: bad code -- https://master.php.net/note/delete/110870/bad+code Del: spam -- https://master.php.net/note/delete/110870/spam Del: non-english -- https://master.php.net/note/delete/110870/non-english Del: in docs -- https://master.php.net/note/delete/110870/in+docs Del: other reasons-- https://master.php.net/note/delete/110870 Reject -- https://master.php.net/note/reject/110870 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#192569) next »