Substr or Drupal_substr?
Coder keeps flagging this, so I thought I'd ask about it. Following a parse_url() of a URL input from a form, is the use of drupal_substr() really necessary, or is a basic substr() adequate? Nancy Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
I believe if drupal provides a wrapper function, why not use it. Yes, drupal_substr is slower than substr itself with large amount of information to be processed and with multiple hits on a page, this can impact the page load time too. On Tue, May 8, 2012 at 6:41 AM, Ms. Nancy Wichmann <nan_wich@bellsouth.net>wrote:
Coder keeps flagging this, so I thought I'd ask about it. Following a parse_url() of a URL input from a form, is the use of drupal_substr() really necessary, or is a basic substr() adequate?
*Nancy* Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.
-- [ Drupal support list | http://lists.drupal.org/ ]
-- Regards, Vaibhav Jain
On Mon, 2012-05-07 at 18:11 -0700, Ms. Nancy Wichmann wrote:
Coder keeps flagging this, so I thought I'd ask about it. Following a parse_url() of a URL input from a form, is the use of drupal_substr() really necessary, or is a basic substr() adequate?
Nancy
Drupal's PHP wrapper functions (http://api.drupal.org/api/drupal/includes! common.inc/group/php_wrappers/7) usually about calling the right PHP function that support UTF-8. Eh, more information on that link (about RFC handling of url thing that I dunno).
On Mon, May 7, 2012 at 9:11 PM, Ms. Nancy Wichmann <nan_wich@bellsouth.net> wrote:
Coder keeps flagging this, so I thought I'd ask about it. Following a parse_url() of a URL input from a form, is the use of drupal_substr() really necessary, or is a basic substr() adequate?
What is the coder message? I see nothing about drupal_substr in the http://drupal.org/update/modules/6/7 page. Coder is very imperfect so maybe it is a bug. I opened several issues last month. -- Earnie -- https://sites.google.com/site/earnieboyd
participants (4)
-
Earnie Boyd -
Fahri Reza -
Ms. Nancy Wichmann -
Vaibhav Jain