PHP data types
Në shqip: Tipet e të dhënave në PHP
ShpjegimiSQ
PHP-ja ka tipet string, int, float, bool, array, object dhe null. Me var_dump() ose gettype() sheh çfarë tipi ka një vlerë. PHP-ja i konverton tipet vetë kur duhet — ndonjëherë me surpriza.
EnglishEN
PHP has the types string, int, float, bool, array, object and null. With var_dump() or gettype() you see a value's type. PHP converts types by itself when needed — sometimes with surprises.
Si ta mendosh
Si enët në kuzhinë, secila për llojin e vet.
Lexoje në anglisht
Like kitchen containers, each for its own kind of thing.
Shembull kodiphp
<?php
var_dump(42); // int(42)
var_dump("42" + 1); // int(43) — konvertim automatik
var_dump(1.5); // float(1.5)