3 ms·
You can easily add something like accessors using traits. I cooked this up in 5 minutes: https://gist.github.com/jsebrech/6740010 https://gist.github.com/jsebre
by Joeri 13y ago
You can easily add something like accessors using traits. I cooked this up in 5 minutes: https://gist.github.com/jsebrech/6740010 https://gist.github.com/jsebrech/6740010
You can do a lot with meta-programming in PHP. For example, you can write your own array type if you are so inclined and use it anywhere you would use an array. Here's an experimental library that showcases the meta-programming abilities: https://github.com/jsebrech/php-o https://github.com/jsebrech/php-o
- maerF0x0 13y agoi can do something interesting with __set and __get , but i really just want it to be part of the language. Nice ideas in the meantime tho.