Framework that provides tools for developers and software architects to improve their performance, analyze code easier and improving overall experience with PHP.
In python 3 exists really comfortable way to convert objects and other types through simple short methods.
This ticket is for implementation of the minimal set of methods to allow objects to configure the way those should be converted to primitives.
The following methods (and corresponding meta-magic methods) should be implemented as:
[ ] int()
[ ] float()
[ ] bool()
[ ] str()
[ ] obj()
[ ] arr() - Turn object to an array through ___array() meta-magic method
[ ] bx() - Accepting the non Box objects should convert them into Box object through ___box() meta-magic method
In python 3 exists really comfortable way to convert objects and other types through simple short methods. This ticket is for implementation of the minimal set of methods to allow objects to configure the way those should be converted to primitives. The following methods (and corresponding meta-magic methods) should be implemented as:
int()
float()
bool()
str()
obj()
arr()
- Turn object to an array through___array()
meta-magic methodbx()
- Accepting the nonBox
objects should convert them intoBox
object through___box()
meta-magic methodExample of they way it works:
Non-implemented
___int()
Output would be:
Output would be: