<?php class myclass { public $arr = array(); public function myfunc(){ $this->arr[1] = 'one'; $this->arr[2] = 'two'; } } $obj = new myclass; var_dump($obj);
You have javascript disabled. You will not be able to edit any code.