Anonymous | Login | Signup for a new account | 12-17-2024 08:55 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0001682 | [Quercus] | major | always | 04-11-07 07:21 | 04-11-07 15:57 | ||||
Reporter | obaltz | View Status | public | ||||||
Assigned To | nam | ||||||||
Priority | normal | Resolution | fixed | ||||||
Status | closed | Product Version | 3.0.23 | ||||||
Summary | 0001682: Quercus: print_r() ignores return parameter | ||||||||
Description |
On quercus, it seems like print_r always prints its output, regardless of the 2nd argument (return param). The php docs say: "If you would like to capture the output of print_r(), use the return parameter. If this parameter is set to TRUE, print_r() will return its output, instead of printing it (which it does by default)." See Additional Information for a demo script. |
||||||||
Additional Information |
<?php $a = array( 0,1,2,3,4,5,6,7,8,9 ); $b = print_r( $a, true ); // should store output in $b without printing it print( 'Neither $a nor $b have ever been printed!' ); ?> Quercus outputs: Array ( [0] => 0 [1] => 1 [2] => 2 [3] => 3 [4] => 4 [5] => 5 [6] => 6 [7] => 7 [8] => 8 [9] => 9 ) Neither $a nor $b have ever been printed! |
||||||||
Attached Files | |||||||||
|
Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
29 total queries executed. 26 unique queries executed. |