Sure it can. It can't be done well but if you can guarantee the limits of the input (ie if the HTML structure doesn't change) then I don't see why not.
If you are concerned about making many objects and only using them once or something, make the function static. This will allow you to write something like Thread::getPosts($threadid); and you will not have to instantiate a new Thread object
Regarding array_merge, If your input array has numerical keys they will be destroyed and replaced with zero-indexed keys.
From the manual
Or
I'm guessing OP's script didn't use it as it looks very PHP4. Nothing says eww like
Sure it can. It can't be done well but if you can guarantee the limits of the input (ie if the HTML structure doesn't change) then I don't see why not.
PHP does have semaphores mind
If you are concerned about making many objects and only using them once or something, make the function static. This will allow you to write something like Thread::getPosts($threadid); and you will not have to instantiate a new Thread object
Why doesn't most paths lead to Helvetica?!
End of this list.
Back to top