From: ("")
Date:  08 Feb 2016 18:44:28 Hong Kong Time

[PEAR-BUG] Bug #20956 [Com]: preg_replace(): The /e modifier is deprecated

NNTP-Posting-Host:  null

Edit report at

 ID:               20956
 Comment by:
 Reported By:      roxanne at moretoit dot net
 Summary:          preg_replace(): The /e modifier is deprecated
 Status:           Open
 Type:             Bug
 Package:          HTML_Template_IT
 Operating System: linux
 Package Version:  1.3.0
 PHP Version:      5.5.29
 Roadmap Versions: 
 New Comment:

i don't get the error at the same line, but here is a patch that solves
the issues for the preg_replace with callback in the getFile() method:

<         return preg_replace_callback(
<             "##im",
<             create_function('$matches', 'return
>         return preg_replace(
>             "##ime",
>             "\$this->getFile('\\1')",

using a real anonymous function would of course be even betterer, but
i'm not sure what is the php compatibility level of the module is..

Previous Comments:

[2015-10-01 02:16:48] gregorycu

A work-around for this is to disable deprecation warnings.


[2015-10-01 01:27:49] roxswan

I have an app that has been running just fine for a few years and this
week it throws the following error on the home/login page:

/home/howtoit0/PEAR/HTML/Template/IT.php (2189)
preg_replace(): The /e modifier is deprecated, use preg_replace_callback

My hosting provider did just upgrade MySQL from the version tree 5.5 to
version 5.6 as well as the Apache to 2.4 Version and the PHP releases to

I have run all PEAR updates but the problem persists.

Test script:
You can see this error in action at

Expected result:
The page should show a login box on the left side panel and text in the
main panel.

Actual result:
At the moment, the login box does not display and the error message
listed in the previous description displays instead of the usual text.


Edit this bug report at