PHP: T�pusok - Manual
PHP  
downloads | documentation | faq | getting help | mailing lists | | php.net sites | links 
search for in the  
previousMegjegyz�sek - kommentekLogikai adatt�pusnext
Last updated: Fri, 30 Aug 2002
view the printer friendly version or the printer friendly version with notes or change language to English | Brazilian Portuguese | Chinese | Czech | Dutch | Finnish | French | German | Italian | Japanese | Korean | Polish | Romanian | Russian | Spanish | Swedish | Turkish

Fejezet 7. T�pusok

Bevezet�

A PHP nyolc primit�v t�pust t�mogat.

A n�gy skal�r t�pus:

A k�t �sszetett t�pus:

V�g�l k�t speci�lis t�pus:

Megjegyz�s: Ebben a k�zik�nyvben gyakran tal�lkozhatsz mixed param�terekkel is. Ez a kv�zi-t�pus csak a dokument�ci�kban l�tezik, annak jel�l�s�re szolg�l, hogy t�bbf�le lehet�s�g adott arra a param�terre.

A v�ltoz� t�pus�t rendszerint nem a programoz� adja meg [persze van belesz�l�sa...], hanem a PHP fut�si id�ben hat�rozza meg a v�ltoz� k�rnyezet�t�l f�gg�en.

Megjegyz�s: Ha egy kifejez�s �rt�k�re �s/vagy t�pus�ra vagy kiv�ncsi, akkor haszn�ld a var_dump() f�ggv�nyt.

Ha csak a t�pus�t akarod megkapni emberek sz�m�ra olvashat� form�ban, akkor haszn�ld a gettype()-ot. T�pusellen�rz�sre viszont ne ezt, hanem a is_type f�ggv�nyeket haszn�ld a programokban.

Ha egy v�ltoz� t�pus�t egy adott t�pusra kell konvert�lnunk, castolhatjuk a v�ltoz�t, vagy alkalmazzuk r� a settype() f�ggv�nyt.

A v�ltoz� k�l�nb�z�k�pp viselkedhet bizonyos helyzetekben, att�l f�gg�en, hogy az adott pillanatban milyen t�pus�. Ha b�vebb le�r�st szeretn�l, n�zd meg a B�v�szked�s a t�pusokkal c�m� r�szt.

User Contributed Notes
T�pusok
add a note about notes
[email protected]
06-Jun-2001 06:02

To see if something is numeric (a number) then use is_numeric(). All form data is returned as strings so checking a form value as an integer will return false.


[email protected]
22-Mar-2002 02:39

Be carefull! Comparison of any string with integer zero returns TRUE. For example 'hello'==0 is TRUE.
03-Jul-2002 01:22
But 'hello' === 0 is not, === makes sure that they are equivilent and of the same type.
add a note about notes
previousMegjegyz�sek - kommentekLogikai adatt�pusnext
Last updated: Fri, 30 Aug 2002
show source | credits | stats | mirror sites
Copyright © 2001, 2002 The PHP Group
All rights reserved.
This mirror generously provided by:
Last updated: Sat Aug 31 06:19:44 2002 CEST