What would be an efficient and secure way to make an inner class in PHP? I have seen solutions such as in here Nested or Inner Class in PHP but using this type of check in an algorithm would be a lot of processing for every node of an algorithm function.
I have been playing around with certain algorithms in PHP, and this seems to be a big compromise when creating the algorithms in PHP. I can make the node class have all variables as public but that is never an ideal way to go. I haven't seen too many PHP algorithm examples and am starting to wonder if people just don't build them in PHP because of compromises like this?