PHP 4.0 Bug #2892: php -a (interactive mode) doesn't call functions

From: Date: Thu, 02 Dec 1999 11:43:12 +0000
Subject: PHP 4.0 Bug #2892: php -a (interactive mode) doesn't call functions
Groups: php.dev 
Request: Send a blank email to php-dev+get-13379@lists.php.net to get a copy of this message
From: stas@zend.com Operating system: Linux PHP version: 4.0 Beta 3 PHP Bug Type: Scripting Engine problem Bug description: php -a (interactive mode) doesn't call functions 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?

« previous php.dev (#13379) next »