From:             
Operating system: Irrelevant
PHP version:      Irrelevant
Package:          Class/Object related
Bug Type:         Feature/Change Request
Bug description:Limit the result of print_r() to facilitate debugging

Description:
------------
You could add an additional third parameter to print_r() function in order
to limit the nesting level of output.
Instead of showing all levels of nested arrays/objects, it could be limited
to N nesting levels.
If I only want to know my simple class member variables (with 3 or 4 of
them) of an object but the object has members with "references/alias" to
other big objects/classes, the screen is filled with a lot of (in this
case) useless information.
If I could limit in this case the output to 1 or 2 nesting levels it would
be much easier for me to debug.
If this third parameter were ommitted or zero, the whole tree would be
shown (as done now).



-- 
Edit bug report at https://bugs.php.net/bug.php?id=55149&edit=1
-- 
Try a snapshot (PHP 5.2):            
https://bugs.php.net/fix.php?id=55149&r=trysnapshot52
Try a snapshot (PHP 5.3):            
https://bugs.php.net/fix.php?id=55149&r=trysnapshot53
Try a snapshot (trunk):              
https://bugs.php.net/fix.php?id=55149&r=trysnapshottrunk
Fixed in SVN:                        
https://bugs.php.net/fix.php?id=55149&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=55149&r=needdocs
Fixed in release:                    
https://bugs.php.net/fix.php?id=55149&r=alreadyfixed
Need backtrace:                      
https://bugs.php.net/fix.php?id=55149&r=needtrace
Need Reproduce Script:               
https://bugs.php.net/fix.php?id=55149&r=needscript
Try newer version:                   
https://bugs.php.net/fix.php?id=55149&r=oldversion
Not developer issue:                 
https://bugs.php.net/fix.php?id=55149&r=support
Expected behavior:                   
https://bugs.php.net/fix.php?id=55149&r=notwrong
Not enough info:                     
https://bugs.php.net/fix.php?id=55149&r=notenoughinfo
Submitted twice:                     
https://bugs.php.net/fix.php?id=55149&r=submittedtwice
register_globals:                    
https://bugs.php.net/fix.php?id=55149&r=globals
PHP 4 support discontinued:          
https://bugs.php.net/fix.php?id=55149&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=55149&r=dst
IIS Stability:                       
https://bugs.php.net/fix.php?id=55149&r=isapi
Install GNU Sed:                     
https://bugs.php.net/fix.php?id=55149&r=gnused
Floating point limitations:          
https://bugs.php.net/fix.php?id=55149&r=float
No Zend Extensions:                  
https://bugs.php.net/fix.php?id=55149&r=nozend
MySQL Configuration Error:           
https://bugs.php.net/fix.php?id=55149&r=mysqlcfg
Try a snapshot (PHP 5.4):            
https://bugs.php.net/fix.php?id=55149&r=trysnapshot54

Reply via email to