Fix a strange cast in PHP.

`(string) 1.0` is equal to "1" instead of "1.0", so we use `sprintf`
instead.
Constant representation does not depend on locale.
Replace `_` by `Realdom` in classnames.
New class() implementation based on Praspel tools.