IT SOLUTIONS
Your full service technology partner! 
-Collapse +Expand
Perl
Search Perl Group:

Advanced
-Collapse +Expand Perl To/From
To/FromCODEGuides
-Collapse +Expand Perl Store
PRESTWOODSTORE

Prestwood eMagazine

December Edition
Subscribe now! It's Free!
Enter your email:

   ► KBWebsite Scri...PerlBeginners Co...   Print This     
  From the June 2012 Issue of Prestwood eMag
 
Perl Beginners Corner:
PHP Case Sensitivity (Yes and No)
 
Posted 16 years ago on 11/6/2008 and updated 1/3/2009
Perl Code Snippet:
 A flashcard from our Perl Flashcards Library
 A code snippet from our Perl Code Snippets Page

KB101540

Languages Focus: Case Sensitivity

Case sensitiviy in this case is referring to commands and variable names. For example, are "printf" and "PrintF" equivalent? Are fullname and FullName equivalent? When you create commands, operations, methods, or variables should you worry about case?

PHP Case Sensitivity

PHP is case sensitive with variable names but not with commands. Although commands are case incenstive, I prefer to use all lowercase because it's easy to type and that's what I see most PHP coders doing and I see it on PHP.Net.

Syntax Example:

All of the following are equivalent:

echo "hello<br>";
ECHO "hello<br>";
Echo "hello<br>";
eCHo "hello<br>";

...but variables are case sensitive:

$fullname = "Mike Prestwood"; //These are two...
$FullName = "Wes Peterson";   //separate varialbes.

Comments

1 Comments.
Share a thought or comment...
Comment 1 of 1

Write it all in lowercase, right? Spider Solitaire 2 Suit is my favorite game, join the game and enjoy great challenges

Posted 36 months ago
 
Write a Comment...
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P144A1
Enter key:
Code Contributed By Mike Prestwood:

Mike Prestwood is a drummer, an author, and creator of the PrestwoodBoards online community. He is the President & CEO of Prestwood IT Solutions. Prestwood IT provides Coding, Website, and Computer Tech services. Mike has authored 6 computer books and over 1,200 articles. As a drummer, he maintains play-drums.com and has authored 3 drum books. If you have a project you wish to discuss with Mike, you can send him a private message through his PrestwoodBoards home page or call him 9AM to 4PM PST at 916-726-5675 x205.

Visit Profile

 KB Article #101540 Counter
8817
Since 11/6/2008
Go ahead!   Use Us! Call: 916-726-5675  Or visit our new sales site: 
www.prestwood.com


©1995-2024 Prestwood IT Solutions.   [Security & Privacy]