LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 06-07-2011, 01:00 PM   #1
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: Arch + X.org + IceWM
Posts: 1,195

Rep: Reputation: Disabled
Question How many of PHP functions & operators should one remember to code?


Hello!
So if you are a PHP-programmer (average one) and code for money, how many of funtions and operators of PHP should you remember by heart (in real life)? I was looking through php.net and man there are millions of tonns of them!

Last edited by Mr. Alex; 06-08-2011 at 06:23 AM.
 
Old 06-07-2011, 02:34 PM   #2
Guttorm
Senior Member
 
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,119

Rep: Reputation: 218Reputation: 218Reputation: 218
I code PHP for money, but by heart and in real life? I hope none. Learn how to search. Make something with passion and you're good. People don't want to see your code.
 
1 members found this post helpful.
Old 06-07-2011, 03:00 PM   #3
sundialsvcs
Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,278

Rep: Reputation: 1088Reputation: 1088Reputation: 1088Reputation: 1088Reputation: 1088Reputation: 1088Reputation: 1088Reputation: 1088
I would simply expect you to be competent with the language, and able to deliver on your promises. However, I would also expect you to know how to properly avail yourself of reference materials and the possibly-greater expertise of your co-workers. No one knows it all. No one needs to.

"I'm hiring a workman, not an encyclopedia."
 
1 members found this post helpful.
Old 06-07-2011, 03:48 PM   #4
dugan
Senior Member
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 4,572

Rep: Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394Reputation: 1394
Never memorize what you can look up.
 
1 members found this post helpful.
Old 06-08-2011, 05:10 AM   #5
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: Arch + X.org + IceWM
Posts: 1,195

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Guttorm View Post
I code PHP for money, but by heart and in real life? I hope none. Learn how to search. Make something with passion and you're good.
So everytime you need to perform something particular in your PHP script you just search for a function in Google?
 
Old 06-08-2011, 06:04 AM   #6
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: FreeBSD, Debian, Mint, Puppy
Posts: 3,284

Rep: Reputation: 172Reputation: 172
yep that's it.

if there is a well developed library use it.

for instance, recently I needed to convert between timezones.
I used standard time library functions to do the job.


If I was to write my own, I'd need to take into a account
country and time zones, the calendar, daylight saving time and who knows what else.

To do it myself would take weeks of work to research/test/debug
before I could be 99% sure it works ok.

So I use a library.
 
Old 06-08-2011, 07:58 AM   #7
graemef
Senior Member
 
Registered: Nov 2005
Location: Hanoi
Distribution: Fedora 13, Ubuntu 10.04
Posts: 2,376

Rep: Reputation: 147Reputation: 147
Quote:
Originally Posted by Mr. Alex View Post
So everytime you need to perform something particular in your PHP script you just search for a function in Google?
A better starting point for PHP would be it's own documentation rather than Google. You can download the whole documentation in either html or in help file format and do you searching from there. If you don't find the function that you are after then check out Pear. If you are still out of luck then google.
 
1 members found this post helpful.
Old 06-08-2011, 08:41 AM   #8
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: FreeBSD, Debian, Mint, Puppy
Posts: 3,284

Rep: Reputation: 172Reputation: 172
agreed graemef.

I usually download it and install it on my internal web server.
 
Old 06-09-2011, 07:15 AM   #9
sundialsvcs
Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,278

Rep: Reputation: 1088Reputation: 1088Reputation: 1088Reputation: 1088Reputation: 1088Reputation: 1088Reputation: 1088Reputation: 1088
Quote:
Originally Posted by dugan View Post
Never memorize what you can look up.
To that end, whenever I'm teaching at the community college, you can bring a one-page "cheat sheet" to every test including the final exam. As long as you prepared it, and staple it to the test when you turn it in, "everyone has reference materials available to them, and refers to those materials constantly on the job, and so any situation that demands rote memorization is both unfair and useless." (Preparing such a sheet is also the best study-method that I know.)
 
Old 06-09-2011, 11:21 AM   #10
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,079

Rep: Reputation: 368Reputation: 368Reputation: 368Reputation: 368
yep, i myself usually have an idea of what php function is necessary for the task at hand but not always the exact syntax, so i'm always frequenting php.net
if you use firefox, there is a search addon for php.net documentation so you can search php.net from firefox's search bar, i would recommend you add that.

another useful tool for the HTML end of your php scripts would be firebug.
 
1 members found this post helpful.
  


Reply

Tags
function, php


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] A bit confused with && and || operators in shell script luvshines Programming 6 11-24-2009 12:37 PM
Bash background (&) with control operators (&&) int0x80 Programming 1 02-11-2009 12:54 PM
PHP code inside a javascript function fatrandy13 Programming 4 03-12-2008 05:57 PM
C-code for median and sobel operators using pthreads katerinake Programming 1 08-23-2007 04:57 PM
Passing one php function result as a parameter to another php function davee Programming 13 09-12-2004 12:08 PM


All times are GMT -5. The time now is 07:27 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration