Created
May 21, 2015 12:10
-
-
Save habibun/230dad7bdf32dfe009a8 to your computer and use it in GitHub Desktop.
Deprecated: preg_replace(): The /e modifier is deprecated
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$event['method'] = 'on'.preg_replace(array( | |
'/(?<=\b)[a-z]/ie', | |
'/[^a-z0-9]/i' | |
), array('strtoupper("\\0")', ''), $event['event']); | |
replace with | |
$event['method'] = 'on'.preg_replace_callback(array( | |
'/(?<=\b)[a-z]/i', | |
'/[^a-z0-9]/i', | |
), function ($matches) { return strtoupper($matches[0]); }, $event['event']); | |
$event['method'] = preg_replace('/[^a-z0-9]/i', '', $event['method']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment