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
Rysh
post
Post #2





Grupa: Zarejestrowani
Postów: 821
Pomógł: 111
Dołączył: 11.09.2006
Skąd: Biała Podlaska

Ostrzeżenie: (0%)
-----


Cytat
isset() only works with variables as passing anything else will result in a parse error. For checking if constants are set use the defined() function.
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: 6.10.2025 - 00:10