json-logic-php
json-logic-php copied to clipboard
Change "%" op from integer to floating point
trafficstars
Details are in issue #8.
If accepted, users who are expecting {"%": [10.5, 2]} to result in 1 instead of 0.5 will be unhappy. Hence some might consider this a breaking change instead of a bugfix. JavaScript users are already receiving float modulo values, so this would align JS and PHP in terms of features.
An alternative would be to make two new ops for intmod and floatmod for explicit behaviors.