various bugfixes:
better `goto` support;
php substr function fix;
better comments handling;