My question is. Can we expect more deep comparission between code style PHP and Zephir?
For now it's very weak.
For example as common example, we have to use double quotes instead of single quotes. In coomon Zephir give us some kind of error, but for example I was in stuck couple days why
implode() function does nothing without any errors from Zephir side. Until I've looked carefully and find that I used
implode('.', somearray); single quotes
Also I think there is necessary some explanation about how to use regular expression, because if I use it in PHP way, than I get something like that
"~(\S+)\\s+-\\s+(\\S+)~u" : "\\1 \\- \\2"
/work/zephir-projects/foolzc/ext/foolzc/sphinxql/sphinxql.zep.c: In function 'zim_FoolzC_SphinxQL_SphinxQL_halfEscapeMatch': /work/zephir-projects/foolzc/ext/foolzc/sphinxql/sphinxql.zep.c:2305:65: warning: unknown escape sequence: '\S' [enabled by default] add_assoc_stringl_ex(from_to_preg, SS("~(\S+)\\s+-\\s+(\\S+)~u"), SL("\\1 \\- \\2"), 1); ^ /work/zephir-projects/foolzc/ext/foolzc/sphinxql/sphinxql.zep.c:2305:65: warning: unknown escape sequence: '\S' [enabled by default]
In other words I have to use regular expression in a C way, not in PHP way. I understand that it's not a bug or issue, but I think this should be in documentation for devs which came from free-world of PHP.