Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #3657

Re: print_r

From Jerry Stuckle <jstucklex@attglobal.net>
Newsgroups comp.lang.php
Subject Re: print_r
Date 2011-11-03 11:58 -0400
Organization A noiseless patient Spider
Message-ID <j8udmu$4ev$1@dont-email.me> (permalink)
References <bbd341c6-d3e6-454c-95d2-5b628030ca49@a7g2000yqd.googlegroups.com>

Show all headers | View raw


On 11/3/2011 11:24 AM, bob wrote:
> Can I count on the print_r function to output info in the same format
> always?
>
> I did a print_r on an array and got something like this:
>
> Array
> (
>      [status] =>  0
>      [email] =>  bob@coolgroups.com
>      [firstname] =>  bob
>      [lastname] =>  smith
>      [id] =>  148
>      [access] =>  2040ad981d3302d63564b990fea38268
> )
>
>
> I want to make sure that doesn't change in PHP 6 or 7.
>

There is no guarantee the output format will remain the same in any version.

But does it make a difference?  No.  It's meant to be a debug aid, not a 
way of passing information to another program or similar.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

print_r bob <bob@coolgroups.com> - 2011-11-03 08:24 -0700
  Re: print_r Jerry Stuckle <jstucklex@attglobal.net> - 2011-11-03 11:58 -0400
  Re: print_r Denis McMahon <denismfmcmahon@gmail.com> - 2011-11-03 16:53 +0000
  Re: print_r "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid> - 2011-11-07 09:28 +0100

csiph-web