php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2892 php -a (interactive mode) doesn't call functions
Submitted: 1999-12-02 06:43 UTC Modified: 2001-05-06 11:09 UTC
From: stas at zend dot com Assigned: Andi (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0 Beta 3 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: stas at zend dot com
New email:
PHP Version: OS:

 

 [1999-12-02 06:43 UTC] stas at zend dot com
Script set.php3:

<?
 class x {
  var $a=2;
  function seta ($b) {
        $this->a = $b;
        echo "$b\n";
  }
}

$y = new x();
echo $y->a,"\n";

$y->seta(10);
echo $y->a,"\n";
?>

Run: php -f set.php3
get:
2
10
10 

still OK. Now run php -a < set.php3:
Interactive mode enabled

Content-Type: text/html

2
2


Huh? where's my method call? Or interactive mode isn't what I thought it is?

Strange thing is that php < set.php3 does work, so what "interactive mode" is in fact?

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-23 02:54 UTC] zak at cvs dot php dot net
Is this problem still occuring in the most recent release?
 [2000-07-23 11:06 UTC] stas at cvs dot php dot net
Yes it does.
 [2001-04-29 13:39 UTC] andi@php.net
Interactive mode is very limited and only meant to check simple things with. We can keep it as an assigned bug but I don't think it'll ever be fixed.
 [2001-05-06 11:09 UTC] zeev@php.net
Beat ya to it, Andi :)

Fixed in the CVS
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 03 14:01:30 2024 UTC