Declares values on objects and output the values
===

I need some guide or reference on how should I do this.
What I should do is, have a class structure named Cat and have a static method that outputs new object. 

    <?php
    class Cat{
    public $name;
    public $age;
    
    	static public function ToData($Cat) {
    		$input = "";
    		foreach ($Cat as $key => $value) {
    			$input .= "object: " . $key . "</br>";
    		}
    		return $input;
    	}
    }
    
    $name = "meow";
    $age = "12";
    $Cat = array($name, $age);
    $output = Cat::ToData($Cat);
    echo $output;
    
    ?>


This is the best thing that I can come up with
here is the problem, they said I just used an array and not an object.
I used array because I have to put the values on the $Cat so it can be passed on the parameter.