Bug #10584 Updated: flush() in functions - behaviour wrong?

From: Date: Tue, 01 May 2001 18:46:54 +0000
Subject: Bug #10584 Updated: flush() in functions - behaviour wrong?
Groups: php.dev 
Request: Send a blank email to php-dev+get-53218@lists.php.net to get a copy of this message
ID: 10584 Updated by: cmv Reported By: hara@oderwat.de Status: Open Bug Type: Scripting Engine problem PHP Version: 4.0.5 Assigned To: Comments: Well, I would say it's counter-intuitive perhaps, but not wrong. :) Think of it like a math expression, with parenthesis defining precedence: evaluated first vvvv print( "0" . test() ); ^ ^ evaluated second So the test() gets evaluated first which does it's flush(), then the rest. (Besides, test() doesn't return anything, so printing it's result is probably wrong anyway.) - Colin Previous Comments: --------------------------------------------------------------------------- [2001-05-01 14:21:04] hara@oderwat.de <?php function test() { print("1"); flush(); } print("0".test()); ?> RESULT: 10 I think thats wrong! - Hans --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=10584&edit=2

« previous php.dev (#53218) next »