I created a new class called Player with two properties:
I have no idea how the following code worked with me: why am I asking you:
<?php $player = new Player(); $player->name = "Someone"; $player->ID = 123; $player->color = "Red";
I could set the color property and use it when I did not even declare it in my class file. How is this possible?
Eliko source share