diff --git a/admin/history.php b/admin/history.php index 40648e4f6..34ec64163 100644 --- a/admin/history.php +++ b/admin/history.php @@ -377,7 +377,7 @@ SELECT { $tags_string = preg_replace_callback( '/(\d+)/', - create_function('$m', 'global $name_of_tag; return isset($name_of_tag[$m[1]]) ? $name_of_tag[$m[1]] : $m[1];'), + function($m) use ($name_of_tag) { return isset($name_of_tag[$m[1]]) ? $name_of_tag[$m[1]] : $m[1];} , str_replace( ',', ', ', diff --git a/admin/include/functions_notification_by_mail.inc.php b/admin/include/functions_notification_by_mail.inc.php index 204be5c33..523f1295d 100644 --- a/admin/include/functions_notification_by_mail.inc.php +++ b/admin/include/functions_notification_by_mail.inc.php @@ -89,7 +89,7 @@ function check_sendmail_timeout() */ function quote_check_key_list($check_key_list = array()) { - return array_map(create_function('$s', 'return \'\\\'\'.$s.\'\\\'\';'), $check_key_list); + return array_map(function($s) { return '\''.$s.'\''; } , $check_key_list); } /* @@ -543,4 +543,4 @@ function subscribe_notification_by_mail($is_admin_request, $check_key_list = arr return do_subscribe_unsubscribe_notification_by_mail($is_admin_request, true, $check_key_list); } -?> \ No newline at end of file +?> diff --git a/comments.php b/comments.php index ebd89a987..bf68fc482 100644 --- a/comments.php +++ b/comments.php @@ -181,10 +181,7 @@ if (!empty($_GET['keyword'])) '('. implode(' AND ', array_map( - create_function( - '$s', - 'return "content LIKE \'%$s%\'";' - ), + function($s) {return "content LIKE \'%$s%\'"; } , preg_split('/[\s,;]+/', $_GET['keyword'] ) ) ). @@ -562,4 +559,4 @@ flush_page_messages(); if (count($comments) > 0) $template->assign_var_from_handle('COMMENT_LIST', 'comment_list'); $template->pparse('comments'); include(PHPWG_ROOT_PATH.'include/page_tail.php'); -?> \ No newline at end of file +?> diff --git a/include/emogrifier.class.php b/include/emogrifier.class.php index 587159e22..a6e3504d0 100644 --- a/include/emogrifier.class.php +++ b/include/emogrifier.class.php @@ -241,7 +241,7 @@ class Emogrifier { $nodesWithStyleAttributes = $xpath->query('//*[@style]'); if ($nodesWithStyleAttributes !== FALSE) { - $callback = create_function('$m', 'return strtolower($m[0]);'); + $callback = function($m) { return strtolower($m[0]); }; /** @var $nodeWithStyleAttribute \DOMNode */ foreach ($nodesWithStyleAttributes as $node) { diff --git a/include/ws_functions/pwg.tags.php b/include/ws_functions/pwg.tags.php index abbdaa619..ae448cf69 100644 --- a/include/ws_functions/pwg.tags.php +++ b/include/ws_functions/pwg.tags.php @@ -32,7 +32,7 @@ function ws_tags_getList($params, &$service) $tags = get_available_tags(); if ($params['sort_by_counter']) { - usort($tags, create_function('$a,$b', 'return -$a["counter"]+$b["counter"];') ); + usort($tags, function($a, $b) { return -$a["counter"]+$b["counter"]; }); } else { @@ -245,4 +245,4 @@ function ws_tags_add($params, &$service) return $creation_output; } -?> \ No newline at end of file +?>