php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #28720 what about a __static() method
Submitted: 2004-06-10 05:33 UTC Modified: 2004-06-10 09:03 UTC
Votes:9
Avg. Score:4.1 ± 1.3
Reproduced:7 of 8 (87.5%)
Same Version:4 (57.1%)
Same OS:4 (57.1%)
From: dardo at gigared dot com Assigned:
Status: Wont fix Package: Feature/Change Request
PHP Version: 5CVS-2004-06-10 (dev) OS: all
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: dardo at gigared dot com
New email:
PHP Version: OS:

 

 [2004-06-10 05:33 UTC] dardo at gigared dot com
Description:
------------
i need to execute a static block of code only one time per 
class 
this is a OOP improvement to php 
 
i wish this 
 
class foo{ 
	$var=123; 
	function __static(){ 
		$this->var+=40; 
	} 
} 
 
like static { } java statement 
 
:P 
 
thanks.. 


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-06-10 09:03 UTC] derick@php.net
No thanks, we will not add this. PHP is not Java.
 [2010-05-17 02:49 UTC] markus at malkusch dot de
This autoloader implementation supports the class constructor __static():
http://php-autoloader.malkusch.de/en/
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Jul 25 03:00:03 2025 UTC