有人知道PHPfinite state machine中有防护功能吗?
finite state machine
php state-machine
我正在使用PHP进行项目,我希望-1 % 4能够返回3.但是,最终结果是-1在PHP中,我不知道为什么:
-1 % 4
3
-1
php > echo -1 % 4; -1
我检查了Ruby IRB,结果是3:
irb(main):001:0> puts -1 % 4 3
php ruby math
php ×2
math ×1
ruby ×1
state-machine ×1