Ask a pro?
Since this is a ComputerCraft forum where we program in Lua, I can see why Imque chose the General section.
To answer the question: I honestly have no idea. But when I was searching for OOP in PHP, I came across this:
http://php.net/manual/en/language.oop5.phpIf you go to the basics section you get something similair, but Im not sure if that is the answer to the question.
Edit: Since Im interested enough, I kept googling. Shortly, I found this page:
http://php.net/manual/en/language.operators.phpIf you scroll down to the
"User Contributed Notes Operators - [12 notes]" go ahead and find
"pgarvin76+php dot net at NOSPAMgmail dot com"And I think I was right, it has to due with OOP
It is method chaining, so if you are familair with lua OOP:
local object = {
__index = object;
create = function()
local self = {
number = 0;
add = function( self )
self.number = self.number + 1
print( self.number )
return self
end;
subtract = function( self )
self.number = self.number - 3
print( self.number )
return self
end;
}
return setmetatable( self, object )
end
}
local newObject = object.create()
newObject:add():add():subtract()
print( newObject.number )
--#Outputs:
--# The chain:
--# 1 .. 2 .. -1
--# The print:
--# -1