note 57532 added to function.phpinfo

From: Date: Thu, 06 Oct 2005 15:38:58 +0000
Subject: note 57532 added to function.phpinfo
Groups: php.notes 
Request: Send a blank email to php-notes+get-96515@lists.php.net to get a copy of this message
check out this cool and fantastic colourful phpinfo()! <?php ob_start(); phpinfo(); $phpinfo = ob_get_contents(); ob_end_clean(); preg_match_all('/#[0-9a-fA-F]{6}/', $phpinfo, $rawmatches); for ($i = 0; $i < count($rawmatches[0]); $i++) $matches[] = $rawmatches[0][$i]; $matches = array_unique($matches); $hexvalue = '0123456789abcdef'; $j = 0; foreach ($matches as $match) { $r = '#'; $searches[$j] = $match; for ($i = 0; $i < 6; $i++) $r .= substr($hexvalue, mt_rand(0, 15), 1); $replacements[$j++] = $r; unset($r); } for ($i = 0; $i < count($searches); $i++) $phpinfo = str_replace($searches, $replacements, $phpinfo); echo $phpinfo; ?> ---- Manual Page -- http://www.php.net/manual/en/function.phpinfo.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+57532 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+57532&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+57532&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+57532&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+57532&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+57532&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+57532&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+57532&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+57532&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#96515) next »