Contact: aviboots(AT)netvision.net.il
43,888 questions
57,280 answers
573 users
declare(strict_types=1); class Product { public int $price; } $p = new Product(); $p->price = 150; // OK $p->price = "150"; // TypeError /* run: ERROR! Fatal error: Uncaught TypeError: Cannot assign string to property Product::$price of type int */