Quiz · Classes and objects · lesson 9 of 11
Quiz — static and const
Question 1 of 3
What does the program print?
<?php
class User
{
public static int $count = 0;
public function __construct() { self::$count++; }
}
new User();
new User();
echo User::$count, "\n";