Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:16256 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 21280 invoked by uid 1010); 16 May 2005 15:29:08 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 75738 invoked from network); 16 May 2005 15:15:12 -0000 Received: from unknown (HELO pb1.pair.com) (127.0.0.1) by localhost with SMTP; 16 May 2005 15:15:12 -0000 X-Host-Fingerprint: 69.64.38.41 bluga.net Linux 2.5 (sometimes 2.4) (4) Received: from ([69.64.38.41:40728] helo=bluga.net) by pb1.pair.com (ecelerity 1.2 r(5656M)) with SMTP id F1/20-36148-009B8824 for ; Mon, 16 May 2005 11:15:12 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by bluga.net (Postfix) with ESMTP id 233A821C99F; Mon, 16 May 2005 10:13:31 -0500 (CDT) Received: from bluga.net ([127.0.0.1]) by localhost (bluga.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 08192-04; Mon, 16 May 2005 10:13:31 -0500 (CDT) Received: from [192.168.0.102] (cpe-66-65-39-8.nyc.res.rr.com [66.65.39.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by bluga.net (Postfix) with ESMTP id A217621C160; Mon, 16 May 2005 10:13:30 -0500 (CDT) Message-ID: <4288B8F9.3040404@php.net> Date: Mon, 16 May 2005 11:15:05 -0400 User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: info@php-HR.net Cc: internals@lists.php.net References: <20050513112935.50036.qmail@lists.php.net> In-Reply-To: <20050513112935.50036.qmail@lists.php.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at bluga.net Subject: Re: Function proposal From: cellog@php.net (Greg Beaver) AnteD wrote: > /** > * Prints the variable in HTML format... > * > * @param mixed $var > * @param bool $return return or print the var > * @return string > */ > function print_pre($var, $return = false) { > $retval = »
«.print_r($var, true).
«; > if($return) return $retval; > print($retval); > } > > ok....let the shooting begin :) the xdebug extension has very nice html-ized var_dump(). Use that on your devel machine and you'll never need your print_pre again. Otherwise I find it easier to simply do this: '; var_dump($blah); echo ''; ?> than to write a function and make sure it is always there. Alternately, view source from your browser works great for grabbing var_dump()/print_r() output. Greg