Fixing str_replace optimizer, improved parser to support any kind of keys expressions when creating arrays