Jobs!
Meetups by TopicMeetups by CityStart a MeetupWhat's Meetup
Home > All Topics > Internet & Technology > PHP Meetups Everywhere > The Sarasota Business & Technology Group
Also in: MySQL · CSS · Web Technology
Organizer:

Join The Sarasota Business & Technology Group!

We'll never share your email address without your permission. Already a Meetup member? Sign in.

Messages

Top Ten Percent of PHP

Message Board › Top Ten Percent of PHP

Steven Bredenberg
user 3235431
Sarasota, FL
8th Post

As we discussed in the last meet up, I think there is a "functional 10%" of the language that you will use 95% of the time. Most PHP applications fall into the pattern of:

1. Receiving an input
2. Generating a reply based upon that input
3. Outputting the generated reply

The top 10% of the language / built-ins fall into those categories fairly neatly. Ordered by common usage:

A. Language Basics
if, ==, !=, <, >, <=,>=, function, foreach, for, class, while, exit

B. Functions: Receiving an input
- From Filesystem: file, file_exists
- From Internet: file, fsockopen
- From database: mysql_connect, mysql_select_db, mysql_query, mysql_fetch_assoc, addslashes
- From user: $_GET, $_POST, $_COOKIE, $_SESSION, session_start, stripslashes

C. Functions: Generating a Reply
trim, substr, explode, join, count, str_replace, strpos, strtolower, ucfirst, ereg, ereg_replace, rand, htmlentities

D. Functions: Outputting the Reply
- To user: echo, setcookie, header, die
- To database: mysql_query, mysql_affected_rows
- To filesystem: fopen, fwrite, fclose, flock


And with that, you can write most things you might need. There are additional built-ins and constructs that scratch additional itches, but they are infrequently needed for the most part. Being able to break out a problem into small chunks and know how to solve each individual chunk comes with experience -- experience comes with actually writing some code.

Dan Matis
user 6799113
Group Organizer
Sarasota, FL
2nd Post

Steve,

Well said! I look forward to learning from you and the other members of our group.

dan

Powered by mvnForum