#27224 [Bgs]: var_dump() cannot be stopped from output

2004-02-12 Thread reklov at unitedklasens dot de
 ID:   27224
 User updated by:  reklov at unitedklasens dot de
 Reported By:  reklov at unitedklasens dot de
 Status:   Bogus
 Bug Type: Unknown/Other Function
 Operating System: Win98SE
 PHP Version:  4.3.4
 New Comment:

Ok, thx...it seems, it was a missunderstanding while reading the manual
(http://reklov.homeip.net/manual/PHP/function.ob-get-flush.html):

ob_get_flush --  Flush the output buffer, return it as a string and
turn off output buffering 



--- i understood it this way: flush the output into a string an turn
off...

instead of flush (understood as delete) the output, send it and return
to a string and turn off...

perhaps this happened, because of my not very well english (i guess,
you have already noticed that...)



Thx for the answer


Previous Comments:


[2004-02-11 15:52:54] [EMAIL PROTECTED]

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

from manual (http://nl3.php.net/ob_flush): 



ob_flush --  Flush (send) the output buffer 







see also:

http://nl3.php.net/manual/en/function.ob-get-clean.php





[2004-02-11 15:50:38] reklov at unitedklasens dot de

Description:

On the contrary to the tip in the documentation
(http://www.php.net/manual/en/function.var-dump.php), there's no chance
to stop var_dump() from outputting. Although you can save it with
output buffering into a string, it will be sent to output, anyway...

As you can see in the example, the var_dump()-output is sent to output
twice, first from var_dump(9), second from echo $output.

Reproduce code:
---
pre

?php

$a = 'Output';

echo 'Output from var_dump():'.\n;

ob_start();

var_dump($a);

$output = ob_get_flush();

echo 'Same as above: '.\n.$output;

?

/pre

Expected result:

pre

Output from var_dump():



Same as above: 

string(6) Output

/pre

Actual result:
--
pre

Output from var_dump():

string(6) Output

Same as above: 

string(6) Output

/pre





-- 
Edit this bug report at http://bugs.php.net/?id=27224edit=1


#27224 [NEW]: var_dump() cannot be stopped from output

2004-02-11 Thread reklov at unitedklasens dot de
From: reklov at unitedklasens dot de
Operating system: Win98SE
PHP version:  4.3.4
PHP Bug Type: Unknown/Other Function
Bug description:  var_dump() cannot be stopped from output

Description:

On the contrary to the tip in the documentation
(http://www.php.net/manual/en/function.var-dump.php), there's no chance to
stop var_dump() from outputting. Although you can save it with output
buffering into a string, it will be sent to output, anyway...
As you can see in the example, the var_dump()-output is sent to output
twice, first from var_dump(9), second from echo $output.

Reproduce code:
---
pre
?php
$a = 'Output';
echo 'Output from var_dump():'.\n;
ob_start();
var_dump($a);
$output = ob_get_flush();
echo 'Same as above: '.\n.$output;
?
/pre

Expected result:

pre
Output from var_dump():

Same as above: 
string(6) Output
/pre

Actual result:
--
pre
Output from var_dump():
string(6) Output
Same as above: 
string(6) Output
/pre

-- 
Edit bug report at http://bugs.php.net/?id=27224edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=27224r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=27224r=trysnapshot5
Fixed in CVS:   http://bugs.php.net/fix.php?id=27224r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=27224r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=27224r=needtrace
Need Reproduce Script:  http://bugs.php.net/fix.php?id=27224r=needscript
Try newer version:  http://bugs.php.net/fix.php?id=27224r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=27224r=support
Expected behavior:  http://bugs.php.net/fix.php?id=27224r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=27224r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=27224r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=27224r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27224r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=27224r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=27224r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=27224r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27224r=float


#26980 [NEW]: Array creation with '{}' instead of '[]'

2004-01-20 Thread reklov at unitedklasens dot de
From: reklov at unitedklasens dot de
Operating system: Win98SE
PHP version:  4.3.4
PHP Bug Type: Arrays related
Bug description:  Array creation with '{}' instead of '[]'

Description:

With $var{$i} = 'Test' I wanted to create a variable with the name 'var1',
using the '{}' and $i == 1, like ${$a}
(http://www.php.net/manual/en/language.variables.variable.php)
Insted of this, it will create an array, as if I had used '[]' instead of
'{}'.

Reproduce code:
---
?php
$i = 1;
$var{$i} = 'Test';
echo $var{$i};
echo 'br';
echo $var{1};
echo 'br';
echo $var1;
?

Expected result:

Testbr
Testbr  //not sure, what would happen...
Test

Actual result:
--
Testbr
Testbr


-- 
Edit bug report at http://bugs.php.net/?id=26980edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=26980r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=26980r=trysnapshot5
Fixed in CVS:   http://bugs.php.net/fix.php?id=26980r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=26980r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=26980r=needtrace
Need Reproduce Script:  http://bugs.php.net/fix.php?id=26980r=needscript
Try newer version:  http://bugs.php.net/fix.php?id=26980r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=26980r=support
Expected behavior:  http://bugs.php.net/fix.php?id=26980r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=26980r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=26980r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=26980r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26980r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=26980r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=26980r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=26980r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26980r=float