2 Replies - 355 Views - Last Post: 18 April 2011 - 07:17 AM Rate Topic: -----

#1 dbeaird727  Icon User is offline

  • D.I.C Head

Reputation: -2
  • View blog
  • Posts: 238
  • Joined: 13-December 10

Would adding a "_" after $this-> have an effect on yo

Posted 18 April 2011 - 06:15 AM

My code is this: " $this->_user = " and I'm curious if this would give me an almost fatal error in Internet explorer?
Is This A Good Question/Topic? 0
  • +

Replies To: Would adding a "_" after $this-> have an effect on yo

#2 batesy3k  Icon User is offline

  • D.I.C Regular

Reputation: 41
  • View blog
  • Posts: 299
  • Joined: 10-September 09

Re: Would adding a "_" after $this-> have an effect on yo

Posted 18 April 2011 - 06:48 AM

Shouldn't make a difference what browser it is running on because all of the PHP is handled SERVER side not CLIENT side
Was This Post Helpful? 1
  • +
  • -

#3 codeprada  Icon User is offline

  • Changed Man With Different Priorities
  • member icon

Reputation: 946
  • View blog
  • Posts: 2,355
  • Joined: 15-February 11

Re: Would adding a "_" after $this-> have an effect on yo

Posted 18 April 2011 - 07:17 AM

Variable names in PHP can start with a letter or underscore and be followed by any amount of letters, numbers and underscores.

Quote

Variable names follow the same rules as other labels in PHP. A valid variable name starts with a letter or underscore, followed by any number of letters, numbers, or underscores. As a regular expression, it would be expressed thus: '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*
- php.net

This post has been edited by codeprada: 18 April 2011 - 07:18 AM

Was This Post Helpful? 1
  • +
  • -

Page 1 of 1