# ZE2 and static methods

- Thread: https://externals.io/message/10359
- Original archive: https://news-web.php.net/php.internals/10359
- Started by l0t3k on 2004-06-10T00:50:08+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #10359 — l0t3k — 2004-06-10T00:50:08+00:00

URL: https://externals.io/message/10359#10359

in an OOP extension using methods tagged as ZEND_ACC_STATIC, does ZE2
prevent them from being called statically or do i always need to do :

    if (!getThis()) {
           ERROR("Cannot call this method statically");
           RETURN_FALSE;
    }

l0t3k

---

## #10360 — l0t3k — 2004-06-10T00:53:21+00:00

URL: https://externals.io/message/10359#10360 · In reply to: #10359

lets try again
 in an OOP extension using methods <em>NOT</em> tagged as ZEND_ACC_STATIC,
does ZE2
 prevent them from being called statically or do i always need to do :

     if (!getThis()) {
            ERROR("Cannot call this method statically");
            RETURN_FALSE;
     }

 l0t3k

---

## #10362 — John Coggeshall — 2004-06-10T02:05:37+00:00

URL: https://externals.io/message/10359#10362 · In reply to: #10360

Um, that's the type of thing that a quick test could tell you, isn't it?

John


> lets try again
>  in an OOP extension using methods <em>NOT</em> tagged as ZEND_ACC_STATIC,
> does ZE2
>  prevent them from being called statically or do i always need to do :
> 
>      if (!getThis()) {
>             ERROR("Cannot call this method statically");
>             RETURN_FALSE;
>      }
> 
>  l0t3k
-- 
-=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=-
John Coggeshall                   http://www.coggeshall.org/
The PHP Developer's Handbook    http://www.php-handbook.com/
-=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=--=~=
