Pick the correct behavior of a static property across multiple object instances.
class Counter { public static int $count = 0; } and three separate Counter objects each increment self::$count in their constructor.
Ready to try it?
Create a free account and try "Shared State via Static Properties" free for 7 days, no card required. Earn 70 XP and track your internship progress.
Already have an account? Sign in