Posts Tagged ‘PHP’

PHP – dynamic vars in classes

As I’m all about python, and pythonic is the way I speak any coding language, I had a challenge in finding a way to dynamically implement new variables in a class. Unlike python, in which this is very simply done by: class MyClass: def __init__(self): self.newvar = ‘value’ self.newvar2 = ‘bla’ It’s quite the challenge [...]

Read the rest of this entry »