2

I've dig the database here and didn't found any answer for my question.

What is a standard for a php programmer to know? I mean, literally, what group of language functions, mechanisms, variables should person know to consider oneself a (good) php programmer? (I know 'being good' is beyond language syntax, still I'm considering syntax of plain php only)

To give an example what I mean:

  • functions to control http sessions, cookies
  • functions to control connection with databases
  • functions to control file handling
  • functions to control xml etc..

I omit phrases like 'security' or 'patterns' or 'framework' intentionally as it applies to every programming language.

Hope I made myself clear, any input appreciated :)

EDIT 1:

Note:

Michael J.V. is right claiming that databases are independent from language, so to put my question more precisely and emphasise differences:

Practises or security, are some ideas to implement (there is no 'Pattern' object with 'Decorator()' method, is there?) while using databases means knowing a mysqli and a set of its methods.

EDIT 2: It all came to me after some interview task:

Count seconds, days, months, years elapsed since date input till now.

So I had opened the php docs to check date functions. After I had done tasks the interviewer told me he wasn't satisfied with my actions since datetime() is something everyone should know. That's why I'm asking all this. What everybody should know..

lilly
  • 195
  • 2
  • 5
  • 2
    Also see [What should a developer know before building a public web site?](http://programmers.stackexchange.com/questions/46716/what-should-a-developer-know-before-building-a-public-web-site) – Jonas Jun 27 '11 at 13:32
  • 1
    What every PHP programmer is irrelevant. What a web developer should know is correct. This is exact dup and not constructive. – TheTechGuy Feb 27 '12 at 01:42

4 Answers4

6

You should know:

  • How HTTP works, since if you are building web applications this will be the main mechanism by which they communicate with your user. Also learn how to administer the webserver you will be testing on, and learn more than just "restart the server", learn how it works.

  • Some HTML and CSS - even if you have a UI designer to write all the HTML for you, you may still need to debug and tweak it.

  • Some basic graphics skills - because sometimes you need to put together placeholder images when the graphics designer is busy. And sometimes the designer will give you a Photoshop file and expect you to cut it up into pieces for the web because they just don't have time/know how to/don't care.

  • Some basic database skills - many web applications these days have some database in the backend. It's good to know how to write basic queries and DML (Data Modification Language) statements even if you have a DBA and framework to help - sometimes the DBA is busy and sometimes the framework doesn't quite work right.

  • How to find help - how to search the core PHP API and any other auxilliary libraries you use, and how to ask for help on internet forums (such as this one, so I assume you already have this one nailed down).

  • Your tools. There are many IDEs and tools out there. Whatever your team/manager chooses, learn it well. Learn the shortcuts, learn the advanced features. Take full advantage of everything it can offer.

  • How to test. Testing a web app is a little different from testing a desktop app or CLI app, but logging and unit testing are still easy and possible.

If you work with a particular framework, it's important to know how it works. If it's based on MVC, make sure you know how to design and build an MVC application that works with the framework.

FrustratedWithFormsDesigner
  • 46,105
  • 7
  • 126
  • 176
5

A PHP programmer should know about::

  • Syntax
  • the PHP core api, including creating classes, functions, operator usage, loops (http://www.php.net/manual/de/index.php.
  • how to connect to mysql databases, how to setup schemas, how to create sql statements
  • how to use php in an object-oriented fashion, including common design patterns like factory, singleton, decorator
  • dependency injection
  • PHPUnit
  • Build tools like Ant or Maven
  • what Continouus Integration is (and tools like buildbot or Jenkins)
  • Zend Framework or Ez Components (now Zeta Components)
  • Logging (log4php)
  • what templating is, or better, has used one templating system
  • HTML / CSS / JavaScript on a good level (but not expert)
  • should have extended Drupal, Joomla or Wordpress
  • should know about one payment API, like the Paypal API or Google checkout

And so on.

I would expect this knowledge of an somewhat experienced PHP programmer. If you need a junior, you can delete something from this list of course. If you need to pay more for this guy, add some stuff. ;-)

Hope it helps!

Christian

Michael K
  • 15,539
  • 9
  • 61
  • 93
Christian
  • 336
  • 1
  • 3
  • 1
    Using and handling MySQL has nothing to do with being a PHP programmer. Dependency injection is a fancy term for something many people do, why did you list it? No explanation why one should know Ant or Maven or why should a PHP programmer be proficient with ZF or Drupal / Wordpress / Joomla (these 3 are something I dislike to the point it makes me throw up when I see the code, no offense to the creators or anyone making a living out of it). When it comes to payment API's, you learn the API when you need it, not before. I totally disagree with your answer, it makes no sense. – Michael J.V. Jun 27 '11 at 13:34
  • 1
    Actually it makes perfect sense for me. Ant/Maven or what you use (pake for example) is necessary if you need to survive in professional environments. I have never worked without a build tool. Dependency Injection is a very important design pattern. Zend Framework does offer it, PIWI too. I also expect a PHP programmer to be able to work with databases. Did you -ever- write PHP app without using a database? Around Drupal & Co, these are the most used CMS at the moment - any PHP developer should have used them. – Christian Jun 27 '11 at 13:40
  • Payment APIs have a special way of working - you should have done it once to know where the bullet points are. To be honest, if you just want to know which functions one must know, then you are looking for a newbie. Get a list out of the manual. Then this questions does not make sense. – Christian Jun 27 '11 at 13:41
  • @Christian - sorry but I simply can't bring myself not to think you're throwing terms as they come. Dependency injection is something we could discuss to oblivion, point is that everyone use it one way or another (container injection, constructor injection etc). It's funny how you mention professionalism yet you don't seem to see what I'm aiming at when I said that PHP development has nothing to do with MySQL and databases. Sure, connecting, selecting and joins are easy. What about scaling the db, creating optimal schema, choosing the hardware and so on? – Michael J.V. Jun 27 '11 at 13:44
  • As for Drupal and the rest - no, it's not true that any php developer should have used them. I'd really be interested in seeing how you used Ant and Maven and why, because I wonder how it comes handy in professional environment. Care to share that with us? – Michael J.V. Jun 27 '11 at 13:46
  • 5
    Since they're doing web programming, they should have some understanding of how HTTP works (such as the differences between POST and GET, etc...) – FrustratedWithFormsDesigner Jun 27 '11 at 13:51
  • First, i said: "how to connect to mysql databases, how to setup schemas, how to create sql statements". This has nothing to do with the administrative tasks. It is basic usage. On Drupal, I think they are most common - many customer in that area want them. As for Maven, please take a look here: http://bit.ly/je4bOc The Pom.xml is for Maven, build.xml is for ant. It is very useful for efficient deployment cycles. Can't believe you do not use such tools? I am for sure not throwing any terms in. But I expect from a PHP programmer more than syntax or function names. – Christian Jun 27 '11 at 13:53
  • 1
    @Christian, I'd kindly suggest that you do not jump to conclusions because if you tend to flame I might as well stop having this discussion. I know what Maven and Ant are, I have used different tools but you mentioned these two without any explanation what they are and what they do and how it's useful. You are throwing terms in without any explanations which leads to confusion. A PHP programmer should always be **aware** of such tools. A PHP programmer should be able to quickly adapt and learn API's of different services. A PHP programmer should be aware of limitations of the language. – Michael J.V. Jun 27 '11 at 14:01
  • @Michael: sorry i didn't want to flame around. I was just surprised. Anyway, I can agree to what you wrote now. But please see, I wrote "Build tools *like* Ant or Maven". I did not say exactly those two. But I expect a PHP programmer to work with at least one of these tools. Be it pake or whatever. – Christian Jun 27 '11 at 14:07
  • 1
    I agree with Christian that a senior level programmer, PHP or otherwise, should know about some sort of build automation and continuous integration. And yes, they should also know how to extract data from a database. I would make any other answers that focus on specific products (Zend, Joomla, Google Checkout) more generic (any web framework, a payment API, any templating system). I would also add PHP config and setup to the list. Any PHP programmer doing it long enough has had to go through Apache hell at some point. – Jordan Jun 27 '11 at 14:31
3
  • PHP Core api
  • PHPUnit
  • JavaScript
  • A good web framework (there are a lot, plus I don't want to start a debate about this :))
  • A good template engine (same comment as above)
  • Linux environment basics (cron jobs, using sudo, managing users, etc...)
  • You mentionned XML related stuff so I'd also advise you to know how to use JSON with PHP.
  • Experimenting with the language and reading the docs

Cheers

just_a_dude
  • 127
  • 3
  • Upvote if you give some more explanation about what each item is useful for to a PHP programmer. :) – Shauna Jun 27 '11 at 18:39
  • The thing is knowing whole PHP Core API is somewhat extensive. I want to know what topics of API should I know at a finger snap. Thanks for the JSON though. – lilly Jun 28 '11 at 23:22
1

A php programmer should know:

  • how the http protocol works
  • the php syntax
  • that he can find 90% of the answers to his questions in the php doc
  • what is available in the array, string, xml, filesystem php API so he does not reinvent the wheel everyday
  • how to handle sessions
  • if using some database: how to use joins and group functions

A decent php programer should know:

  • how to get user inputs safely
  • that you use prepared statements to query a database
  • output buffering
  • what a REST, SOAP or XML-RPC API is and how to use one
  • if using databases: how to normalize his data
  • at least one framework
  • at least one templating system

The two last ones so he can assess if they'll benefit him for a project

A good php programmer should know:

  • how to use a unit test framework to test his work
  • continuous integration
  • how to document his code
  • a style checking app for his code
  • some design patterns and when to use them
  • if using databases: triggers, stored procedures and when to use them.

As any programmer : how to use his IDE and some version control software.

Arkh
  • 591
  • 3
  • 8