I have created a new class named Player with 2 properties:
nameID
I have no idea how the following code worked to me, that's why I'm asking you:
<?php
$player = new Player();
$player->name = "Someone";
$player->ID = 123;
$player->color = "Red"; // Why it worked?
echo $player->color; // Worked great too!
?>
I could set a property color and use it when I haven't even declared it in my class file. How is it possible?