Profiler unable to map (dbg works) |
Site Admin
|
It corresponds to php code that is evaluated (executed) by preg_replace() function. Since it has no physical file, it can't be mapped and may cause mapping errors.
I'd recommend you just ignore the message or use pcre functions that do never run eval() internally and work a bit faster (IMHO). |
||||||||||||
_________________ The PHP IDE team |
Veteran
|
Hi dmitri, thank you for the response; may be you could try to avoid this kind of alerts
About pcre functions: preg_* are pcre functions; aren't? standard php regexp are ereg, eregi, etc Thank you! |
||||||||||||
|
Veteran
|
Yes, the preg_*() function are PCRE; the erg*() functions are POSIX. Both are integral parts of PHP; however, the latter are going away in PHP 6, at least as a built-in component. |
||||||||||||||
|
Veteran
|
yes I know the preg_*() function are PCRE; the erg*() functions are POSIX.
I said that because dmitri suggested to use "pcre functions that do never run eval() internally and work a bit faster" but as shown in my example I already use pcre functions (you can see preg_replace) and I still have the alert from phped |
||||||||||||
|
Veteran
|
Dmitri can correct me if I'm wrong, but I believe he meant don't use PCRE functions that must call eval(). Put more directly, avoid the /e modifier with preg_replace() when you can, because that causes the parser to call eval() on the replacement string with every replacement iteration, which slows things down. Instead, you might try calling preg_replace_callback(), which allows the PHP engine to work with optimized code (unlike eval()). As to your original error, I agree it'd be nice if it was more friendly. I run into it a lot trying to get expressions with strings passed in as a string to assert(), and the first time it happened, it left me quite confused for a bit. |
||||||||||||||
|
Site Admin
|
Sure, all regexps like /whatever/e are executed with eval(). That's what /e flag stands for. I'm sorry for the misleading answer I posted before.
Regarding the mapping error that profiler shows in this case, I don't think that it can be fixed easily. Hopefully will be done in the next major version |
||||||||||||
_________________ The PHP IDE team |
Profiler unable to map (dbg works) |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by