Mantis Bugtracker
  

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

- Relationships

- Notes
(0001837)
nam
04-11-07 15:57

php/124f
 

- Issue History
Date Modified Username Field Change
04-11-07 07:21 obaltz New Issue
04-11-07 13:33 nam Status new => assigned
04-11-07 13:33 nam Assigned To  => nam
04-11-07 15:57 nam Status assigned => closed
04-11-07 15:57 nam Note Added: 0001837
04-11-07 15:57 nam Resolution open => fixed
04-11-07 15:57 nam Fixed in Version  => 3.1.1


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
29 total queries executed.
26 unique queries executed.
Powered by Mantis Bugtracker