<?php class Obj { public $num; public function __construct($num) { $this->num = $num; } } $arr = array(new Obj(1),new Obj(2)); var_dump($arr);
You have javascript disabled. You will not be able to edit any code.