Конвертація типів даних

$b = (boolean) $a;

Допускаються наступні варіанти:

(int), (integer) - приведення до integer

(bool), (boolean) - приведення до boolean

(float), (double), (real) - приведення до float

(string) - приведення до string

(array) - приведення до array

(object) - приведення до object

(unset) - приведення до NULL