View Single Post
  #3  
Old 05-26-2011, 07:10 PM
0PiX0 0PiX0 is offline
Coder
0PiX0's Avatar
Join Date: Jan 2011
Posts: 130
0PiX0 is a jewel in the rough0PiX0 is a jewel in the rough
Quote:
Originally Posted by callimuc View Post
PHP Code:
function onCreated() {
this.bla = ...;
thiso.bla = ...;
temp.bla = ...;

this. prefix points to the current object.
PHP Code:
with (object) {
  
this.somevar 2;
}
echo(
object.somevar); 
thiso. prefix points to the object that is running the script.
PHP Code:
thiso.someothervar 4;
with (object) {
  
this.somevar thiso.someothervar;
}
echo(
object.somevar); 
temp. prefixed vars will be destroyed once the function that contains them has run.
Reply With Quote