[PHP-DEV] Bug #10967 Updated: $x .= someFunction();
ID: 10967 Updated by: jeroen Reported By: [EMAIL PROTECTED] Old Status: Open Status: Bogus Bug Type: Scripting Engine problem Operating System: win2k PHP Version: 4.0.5 New Comment: This is nonsense, what do you expect of $x .= somefunction()? that the second part of $x gets referenced? Previous Comments: [2001-06-12 15:36:34] [EMAIL PROTECTED] well your playing with references where they are not needed.. expect to get your fingers burnt. [2001-05-22 16:50:28] [EMAIL PROTECTED] uhm, well, the thing with the $temp var is useless. i see now that i cannot reference something into *a part* of something else. but the silent loss of br\n is still a problem, imo. fab [2001-05-18 23:41:12] [EMAIL PROTECTED] code i would like to use: ---cut--- function someShit() { return 'foo'; } $out = ''; for ($i = 1; $i = 3; $i++) { $out .= someShit() . br\n; } echo $out; ---cut--- problem: parse error on line $out .= someShit() . br\n; because .= and don't work together. so the workaround would be: $temp = someShit() . br\n; $out .= $temp; problem here: it prints out 'foofoofoo' and not 'foobr\nfoobr\nfoobr\n' so the code finally looks like: ---cut--- function someShit() { return 'foo'; } $out = ''; for ($i = 1; $i = 3; $i++) { $temp = someShit(); $out .= $temp . br\n; } echo $out; ---cut--- is this the normal behavior? fab ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=10967edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] Bug #10967 Updated: $x .= someFunction();
ID: 10967 Updated by: jmoore Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Scripting Engine problem Operating system: PHP Version: 4.0.5 Assigned To: Comments: well your playing with references where they are not needed.. expect to get your fingers burnt. Previous Comments: --- [2001-05-22 16:50:28] [EMAIL PROTECTED] uhm, well, the thing with the $temp var is useless. i see now that i cannot reference something into *a part* of something else. but the silent loss of brn is still a problem, imo. fab --- [2001-05-18 23:41:12] [EMAIL PROTECTED] code i would like to use: ---cut--- function someShit() { return 'foo'; } $out = ''; for ($i = 1; $i = 3; $i++) { $out .= someShit() . brn; } echo $out; ---cut--- problem: parse error on line $out .= someShit() . brn; because .= and don't work together. so the workaround would be: $temp = someShit() . brn; $out .= $temp; problem here: it prints out 'foofoofoo' and not 'foobrnfoobrnfoobrn' so the code finally looks like: ---cut--- function someShit() { return 'foo'; } $out = ''; for ($i = 1; $i = 3; $i++) { $temp = someShit(); $out .= $temp . brn; } echo $out; ---cut--- is this the normal behavior? fab --- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=10967edit=2 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] Bug #10967 Updated: $x .= someFunction();
ID: 10967 User Update by: [EMAIL PROTECTED] Status: Open Bug Type: Scripting Engine problem Operating system: win2k PHP Version: 4.0.5 Description: $x .= someFunction(); uhm, well, the thing with the $temp var is useless. i see now that i cannot reference something into *a part* of something else. but the silent loss of br\n is still a problem, imo. fab Previous Comments: --- [2001-05-18 23:41:12] [EMAIL PROTECTED] code i would like to use: ---cut--- function someShit() { return 'foo'; } $out = ''; for ($i = 1; $i = 3; $i++) { $out .= someShit() . brn; } echo $out; ---cut--- problem: parse error on line $out .= someShit() . brn; because .= and don't work together. so the workaround would be: $temp = someShit() . brn; $out .= $temp; problem here: it prints out 'foofoofoo' and not 'foobrnfoobrnfoobrn' so the code finally looks like: ---cut--- function someShit() { return 'foo'; } $out = ''; for ($i = 1; $i = 3; $i++) { $temp = someShit(); $out .= $temp . brn; } echo $out; ---cut--- is this the normal behavior? fab --- Full Bug description available at: http://bugs.php.net/?id=10967 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]