php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27930 Including remote PHP script, Return DO NOT works.
Submitted: 2004-04-09 07:23 UTC Modified: 2004-04-09 08:50 UTC
From: ricardo dot junior at infosoftonline dot com Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 4.3.4 OS: Windows
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ricardo dot junior at infosoftonline dot com
New email:
PHP Version: OS:

 

 [2004-04-09 07:23 UTC] ricardo dot junior at infosoftonline dot com
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??


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-04-09 08:50 UTC] derick@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 01 02:01:36 2025 UTC