|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1998-04-29 17:50 UTC] zeev
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 10:00:01 2025 UTC |
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();