Fwd: Re: [PHP-DEV] Function proposal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 = false) {
> 	$retval = Â<pre>Â.print_r($var, true).</pre>Â;
> 	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 :)

--

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

Attachment: pgpKIs4AlCR06.pgp
Description: PGP signature


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux