#27008 [Opn->Csd]: Every class method can be called as static

From: Date: Sun, 25 Jan 2004 06:14:19 +0000
Subject: #27008 [Opn->Csd]: Every class method can be called as static
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-53854@lists.php.net to get a copy of this message
ID: 27008 Updated by: sniper@php.net Reported By: hoesh at dorsum dot hu -Status: Open +Status: Closed Bug Type: Zend Engine 2 problem Operating System: * PHP Version: 5CVS-2004-01-22 (dev) New Comment: This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. You can still call any method statically. If it's not possible in the specific case, an error will be output. Previous Comments: ------------------------------------------------------------------------ [2004-01-22 13:31:36] hoesh at dorsum dot hu Description: ------------ Any method of any class can be called staticly. Internals and scripted ones too. * TipOfTheDay * Call any internal class's constructor from outside of object. As object doesn't exists, and ZE2 calls the internal constructor, process crashes immadiately. Reproduce code: --------------- <? domdocument::domdocument(); ?> , or <? domdocument::__construct(); ?> both works, to crash the process. <? class check { function not_static() { echo "Impossible, but works!"; } } check::not_static(); Expected result: ---------------- Warning or fatal error. Actual result: -------------- Crash. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=27008&edit=1

« previous php.bugs (#53854) next »