<?php calss Hoge { public $prop; public function getProp() { return $this->prop; } }
function Hoge() { this.prop = function () { alert("prop"); console.log(this); }; } Hoge.prototype = { array: [1,2,3], method: function () { for (var i = 0, a = this.array; i<a.length; ++i) { var param = a[i]; function abc() { alert(param); } } } }