Date: 04/29/98
- Next message: Zeev Suraski: "Re: [PHP-DEV] Bug #331: static variables in object methods broken"
- Previous message: Zeev Suraski: "Re: [PHP-DEV] Multidimensional arrays in php3.1?"
- Next in thread: Zeev Suraski: "Re: [PHP-DEV] Bug #331: static variables in object methods broken"
- Reply: Zeev Suraski: "Re: [PHP-DEV] Bug #331: static variables in object methods broken"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: jdavis <email protected>
Operating system: linux
PHP version: 3.0 Release Candidate 4
PHP Bug Type: Other
Bug description:
sorry if i'm missing something but it would seem that the
following code should output:
1
2
3
instead $a never is set so it doesn't output anyting (except
the "<p>\n" part)
thank you and pls let me know if you need more info
-----
class foobar {
function init () {
static $a=1;
print $a;
print "<p>\n";
$a++;
}
};
$bar = new foobar; $bar->init(); $bar->init();
$bar->init();
- Next message: Zeev Suraski: "Re: [PHP-DEV] Bug #331: static variables in object methods broken"
- Previous message: Zeev Suraski: "Re: [PHP-DEV] Multidimensional arrays in php3.1?"
- Next in thread: Zeev Suraski: "Re: [PHP-DEV] Bug #331: static variables in object methods broken"
- Reply: Zeev Suraski: "Re: [PHP-DEV] Bug #331: static variables in object methods broken"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

