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
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: 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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Wed May 07 11:01:29 2025 UTC