Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:16253 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 5072 invoked by uid 1010); 16 May 2005 14:32:13 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 90271 invoked from network); 16 May 2005 14:06:22 -0000 Received: from unknown (HELO wettshirts.com) (127.0.0.1) by localhost with SMTP; 16 May 2005 14:06:22 -0000 X-Host-Fingerprint: 216.35.196.23 server299.com Linux 2.4/2.6 Received: from ([216.35.196.23:39226] helo=server299.com) by pb1.pair.com (ecelerity 1.2 r(5656M)) with SMTP id 5B/D7-36148-ED8A8824 for ; Mon, 16 May 2005 10:06:22 -0400 Received: (qmail 19557 invoked from network); 16 May 2005 14:06:16 -0000 Received: from unknown (HELO ?192.168.1.10?) (213.91.217.139) by ns1.server299.com with SMTP; 16 May 2005 14:06:16 -0000 Reply-To: bu@orbitel.bg Organization: Orbitel Date: Mon, 16 May 2005 17:06:15 +0300 User-Agent: KMail/1.7.1 To: internals@lists.php.net MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1641890.Rxclm84hsK"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-ID: <200505161706.15829.bu@orbitel.bg> Subject: Fwd: Re: [PHP-DEV] Function proposal From: bu@orbitel.bg (Petar Nedyalkov) --nextPart1641890.Rxclm84hsK Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Friday 13 May 2005 14:29, AnteD wrote: > Hi guys... > > Yes I know that this is a small function and yes I know it can be > copy-paste with every new project you do but from the first day I've > been using PHP until today this function follows me everywhere and I now > that everyone is using it one way or the other for debugging...... > > the problem is when you want to debug a piece of code separately or use > it in one script then you have to find the function...copy paste to that > script or write it again just for that script...and so on...it would be > great if it could be in the php core.... > > I have a very basic knowledge of C so implementing this function would > be a nightmare for me but for someone who knows C and the inner > "mysteries" of the Zend Engine :) this is a piece of cake.... > > Ok...here it is...don't laugh :) > > /** > * Prints the variable in HTML format... > * > * @param mixed $var > * @param bool $return return or print the var > * @return string > */ > function print_pre($var, $return =3D false) { > $retval =3D =C2=BB
=C2=AB.print_r($var, true).
=C2=AB; > if($return) return $retval; > print($retval); > } I think the Reflection API is enough and works great for me. Such a basic debugging is not the issue when speaking of serious projects with a large OO tree. Just an opinion. > ok....let the shooting begin :) =2D- Cyberly yours, Petar Nedyalkov Devoted Orbitel Fan :-) PGP ID: 7AE45436 PGP Public Key: http://bu.orbitel.bg/pgp/bu.asc PGP Fingerprint: 7923 8D52 B145 02E8 6F63 8BDA 2D3F 7C0B 7AE4 5436 --nextPart1641890.Rxclm84hsK Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) iD8DBQBCiKjXLT98C3rkVDYRAlWuAJ4igjUtHsL6/AodjE2UeP+zMk4jHgCfSaRO jUDZTxCeFPCtUNbspilYI/Q= =lllm -----END PGP SIGNATURE----- --nextPart1641890.Rxclm84hsK--