How would I go about adding boxed objects in PHP?
106 karma · joined October 2, 2012
How would I go about adding boxed objects in PHP?
http://www.reddit.com/r/PHP/comments/1my5cv/introducing_syng...
As a sidenote, I read somewhere recently that there is some method to the needle/haystack madness. Basically, for strings, its needle/stack, and for arrays its stack/needle. Thought I'd share that.
2. Specialise the types more how? Why would I want to hide the actual value - although I suppose I'd want to make sure that no external object can modify its value directly.
3. Like in the constructor? What about for Number, where you can pass it an int, double or float?
That's the kind of thinking I've avoided here, trying to explicitly return a boolean value, or results.
You could get a really shit job that pays fuck-all (around 16k), or on the other end of the spectrum, learn Ruby/Python and get a developer role for around £30k.
The goal of the 'redesign' is just to add some contrast in there and to improve readability.