Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP] isset a metody statyczne
-Pytam-
post
Post #1





Goście







  1. function static bleble(){return NULL;}
  2.  
  3. if(isset(Klasa::bleble()))
  4. {
  5.  
  6. }


Dlaczego powyższy kod zwróci błąd?

Cytat
Fatal error: Can't use function return value in write context in
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
-Pytam-
post
Post #2





Goście







czyli jak to obejść? Przypisać do zmiennej i ją sprawdzić?
  1. $r = Klasa::bleble()
  2.  
  3. if(isset($r))


Tak to ma być?
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 14.10.2025 - 11:57