Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [php]Problem z array w konstruktorze
Noctrum
post 17.03.2008, 17:26:47
Post #1





Grupa: Zarejestrowani
Postów: 6
Pomógł: 0
Dołączył: 12.03.2008

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


Witam

Mam pytanie, co powoduje ze po wpisaniu array:

  1. <?php
  2. public function __construct(array $row) <---- Tak mam w przykladzie i na forum rowniez to zauwazylem
  3. {
  4. ...
  5. }
  6. ?>


otrzymuje taki blad:
  1. <?php
  2. Parse error: syntax error, unexpected T_ARRAY, expecting '&' or T_VARIABLE in c:usrkrasnalwwwpd_oophtmllibclass.xxx.php on line 16
  3. ?>


Ten post edytował Cysiaczek 17.03.2008, 21:37:20
Powód edycji: dodalem tag (cysiaczek)
Go to the top of the page
+Quote Post
sobstel
post 17.03.2008, 21:21:34
Post #2





Grupa: Zarejestrowani
Postów: 853
Pomógł: 25
Dołączył: 27.08.2003
Skąd: Katowice

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


a używasz PHP wersja 5?


--------------------
"If debugging is the process of removing bugs, then programming must be the process of putting them in..."
sobstel.org
Go to the top of the page
+Quote Post
Sedziwoj
post 17.03.2008, 21:29:13
Post #3





Grupa: Zarejestrowani
Postów: 793
Pomógł: 32
Dołączył: 23.11.2006
Skąd: Warszawa

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


Cytat
PHP 5 introduces Type Hinting. Functions are now able to force parameters to be objects (by specifying the name of the class in the function prototype) or arrays (since PHP 5.1)


Czyli ma być >= 5.1


--------------------
Algorytmy w PHP, czy ktoś o tym słyszał?
Dlaczego tak mało kobiet programuje? ponieważ nie zajmują się głupotami.
Go to the top of the page
+Quote Post
Noctrum
post 17.03.2008, 21:34:52
Post #4





Grupa: Zarejestrowani
Postów: 6
Pomógł: 0
Dołączył: 12.03.2008

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


Uzywam krasnal serv a tam jest PHP 5.0.2

Mozecie polecic jakas alternatywe dla krasnala... z PHP >=5.1 smile.gif
Go to the top of the page
+Quote Post
Cysiaczek
post 17.03.2008, 21:36:45
Post #5





Grupa: Moderatorzy
Postów: 4 465
Pomógł: 137
Dołączył: 26.03.2004
Skąd: Gorzów Wlkp.




Jaki arcyciekawy problem obiektowy... Przedszkole!
Alternatywa jest - zainstaluj wszystko oddzielnie.


--------------------
To think for yourself you must question authority and
learn how to put yourself in a state of vulnerable, open-mindedness;
chaotic, confused, vulnerability, to inform yourself.
Think for yourself. Question authority.
Go to the top of the page
+Quote Post
Noctrum
post 17.03.2008, 21:57:17
Post #6





Grupa: Zarejestrowani
Postów: 6
Pomógł: 0
Dołączył: 12.03.2008

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


Najmocniej przepraszam... arcy ciekawy zaczal sie od prostego dla was bledu w konstruktorze ktory 'cos' ma wspolnego z obiektowka.

Zadalem pytanie o serwer 'pakiet' w tym temacie zeby uzyskac odp np od @Sedziwoj'a



Juz znalazlem ... Apache, nastepnym razem bede dokladniej dobieral subfora,

Pozdrawiam

Ten post edytował Noctrum 17.03.2008, 22:02:15
Go to the top of the page
+Quote Post

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

 



RSS Wersja Lo-Fi Aktualny czas: 13.06.2025 - 09:24