converted several switches to ifs and made more opcache friendly
Fixed mem leaks, added tests and ternary operator
Working commit for constant scalar expressions (with constants). Tests will follow.
12345678910