From: ricardo dot junior at infosoftonline dot com Operating system: Windows PHP version: 4.3.4 PHP Bug Type: Unknown/Other Function Bug description: Including remote PHP script, Return DO NOT works.
Description: ------------ I don't know if this is the wanted situation... But if you include a remote php script that has a RETURN statment, the value is not return from remote script. Reproduce code: --------------- simples.php 's code: <? $val = "simples"; return $val; ?> ----------------------------------------------- main_1.php 's code: <? $resultado = include ("./simples.php"); print_r($resultado); ?> ----------------------------------------------- main_2.php 's code: <? $resultado = include ("http://localhost/simples.php"); print_r($resultado); ?> ----------------------------------------------- Expected result: ---------------- Running main_1.php (http://localhost/main_1.php) I got the following output: simples Actual result: -------------- Running main_2.php (http://localhost/main_2.php) I got the following output instead of "simples": 1 What could be done to return the result of a remote script execution?? -- Edit bug report at http://bugs.php.net/?id=27930&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27930&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27930&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=27930&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=27930&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=27930&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=27930&r=needscript Try newer version: http://bugs.php.net/fix.php?id=27930&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=27930&r=support Expected behavior: http://bugs.php.net/fix.php?id=27930&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=27930&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=27930&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=27930&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27930&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=27930&r=dst IIS Stability: http://bugs.php.net/fix.php?id=27930&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=27930&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=27930&r=float