EvilZone
Programming and Scripting => Web Oriented Coding => : Code.Illusionist June 15, 2013, 06:53:34 PM
-
I guess this is pretty dumb question since people ask for different knowledge when you work. But, what most PHP programmers do on their job? What knowledge should I get before applying to any job. I think that this must be learned:
1. Work with uploading files
2. Sending emails
3. Recieving data from users
4. Manipulation with cookies and sessions
5. Math functions
6. Date & Time functions
But, what else I must know ? Is there anyone who work as PHP programmer or have a friend that can tell me what to learn more?
-
Go look at some open source apps programmed in PHP. They should give you a rough idea of what professional programming is like.
Learn SQL and how to use the MySQL PHP interface.
Experience is the best thing to have.
Also (to expand on what Snayler posted), learn how to protect your applications. Owasp (https://www.owasp.org) may come in handy.
Disclaimer: I haven't ever had a job.
-
As Fur already stated, SQL is a "must have". Date & Time functions are also very useful.
I guess one should know how to hash a password. It is important so that a database breach won't reveal the passwords right away (there's always brute-force, but that's another matter). Also, some javascript is useful if you want to implement functions like auto-refresh, opening pop-ups, refreshing the parent windows after the popup is closed (useful if you need some "edit" function) etc...
I've been working on a repair shop application, where the reception can fill in the problem and what services are to be made, and the technician only has to check the page, do what he has to do and fill in what has been done and how much time it took. I used mostly SQL, some date and time functions to keep track of the dates of each repair, mail function for notification e-mails, cookies and session and pretty much everything else OP mentioned, javascript for the functions mentioned above, css for looks,... The only thing I haven't done yet is a way of hashing the passwords, which I already know how to implement.
EDIT: Just remembered and this is very important: A way of making SQLi impossible. This is relatively easy to accomplish, I'm using a function that strips unneeded characters before making the query.
-
Well thank you both for interesting reply as I expected to be. Will focus for start on time and date functions , do plenty of practice and repeat. Then will continue as you suggested. I downloaded some book with 800 pages for PHP and it's quite detailed book. :)
-
[size=78%]EDIT: Just remembered and this is very important: A way of making SQLi impossible. This is relatively easy to accomplish, I'm using a function that strips unneeded characters before making the query.[/size]
I'm sorry but are you kidding me?
Repeat after me: "I must always use parameterized queries
To work professional with PHP, you must learn how to solve problems. Even though you might focus on using PHP syntax and the functionality, the main job of a programmer is solving problems.
-
That's obvious, but what type of knowledge is most wanted in PHP, that was question. Your answer is , how to say, no need to be mentioned.
-
That's obvious, but what type of knowledge is most wanted in PHP, that was question. Your answer is , how to say, no need to be mentioned.
In a professional environment there is no such thing as hiring somebody because he is good with Time and date functions and he knows how to store a cookie.
PHP her/his/it's depth is very shallow compared to other language's like C++ etc. that means that a real professional should know pretty much everything. Ofcourse you can become a freelancer and learn your way through, but you are not going to create REAL sturdy long term applications who will sustain a high amount of users and even the most exact attacks.
I could tell you that if you can create a Zend application according to all/most of the Zend guidelines, you are a Pro. Or if you have extended knowledge about OOP and Programming patterns and you can create a full working MVC, HMVC or an unique Architecture filled up with Programming patterns (singleton, multiton, factory, facade you name it) i allow you to make money.
Learn like you will die tomorrow while you still can, and don't need to worry about making money everyday;).
Also, pick up some frameworks, create applications in them and look closely at the OOP structure and logic. For example, Laravel 4, Zend Framework, Prestashop etc.
-
I'm sorry but are you kidding me?
Nah, I just got into PHP 2 months ago. Because my internship leader decided that a networks student must know how to develop apps that have nothing to do with his course. (A.K.A. taking advantage of free labor force).
-
Nah, I just got into PHP 2 months ago. Because my internship leader decided that a networks student must know how to develop apps that have nothing to do with his course. (A.K.A. taking advantage of free labor force).
Okay. I did not intend to sound that harsh, but being this a hacking forum I really had to point out that such type of sanitazing is not considered a good solution to mitigate SQL injection.
@TS
You might have known that problem solving is required, but when you start asking about knowing specific functions in PHP, something is wrong. Specifics are what manuals are for and php.net is always a good place to start.
-
@Factionwars - Thank you so much for reply, I think it's quite useful. I am not learning anything because I need money (that's not in my head), I will do it only because I like it. I love coding, when I code it's so exciting , all those codes look amazing. Geek xD
-
With the emergence of NoSQL I wouldn't say mastering MySQL is a must for a PHP developer at all.
Research and play around with other database systems.
-
As a freelance website designer, the most important (and frequent) skills I've had to use are form handling (this includes uploaded files), database handling (MySQL, NoSQL, whatever you prefer. But I've always used MySQL and it's very easy to get the hang of), and sessions/cookies (sessions most commonly for user logins).
That being said, like others have said here, you should learn in a broader spectrum. Don't just go after the specifics. The above skills are what I've needed to use most frequently personally, but you could be working in a very different environment. One thing I do suggest is to learn Object Oriented Programming (OOP) in PHP. It's actually very useful. Code the framework for user logins once, and be set for the rest of the websites you create.
I also agree that the most important thing is experience. The more websites you create, the better you get. My first PHP-enabled website was crap, but as I kept going I kept discovering new and better ways to handle things.
GOOGLE IS YOUR BEST FRIEND. If you're running into a specific problem, odds are someone else has ran into that very same problem before.
Specifics are what manuals are for and php.net is always a good place to start.
This is very true. Don't expect to read an 800 page book and remember absolutely everything. For specifics on a function or syntax, a simple Google search will suffice.
-
Thanks both for reply. I don't expect to remember all PHP functions because I am not machine. There is so much function I think best PHP programmers can't remeber all. I will set Database on localhost and play with it for a while.
-
Thanks both for reply. I don't expect to remember all PHP functions because I am not machine. There is so much function I think best PHP programmers can't remeber all. I will set Database on localhost and play with it for a while.
And you'll never need to know them all, ever.
All you need is to understand the concept of what you need to achieve and have a rough idea of how to achieve it. You will get this naturally in time, trust me.
When you're at this point, you'll know exactly what to search for on Google and be able to read other people's examples in the results and work out what you need.
The thing that pisses me off the most about PHP is how needle/haystack functions switch around, such as stristr($haystack, $needle) and in_array($needle, $haystack), but that's just me.
-
Thank you wookie. You all guys have given me what I asked for. Thanks so much. :)
-
[size=78%]The thing that pisses me off the most about PHP is how needle/haystack functions switch around, such as stristr($haystack, $needle) and in_array($needle, $haystack), but that's just me.[/size]
It's not just you. It's the developers of PHP that has no clue what they are doing. The PHP language is really a mess in terms on consistency and speed.
PHP is a really crappy language, but widely deployed.
-
It's not just you. It's the developers of PHP that has no clue what they are doing. The PHP language is really a mess in terms on consistency and speed.
PHP is a really crappy language, but widely deployed.
I second this notion, but let's face it: it's a fairly simple scripting language (its roots in Perl), its standard library and functions are specially tailored for the web and it comes out-of-the-box in server packages and hosting plans, because it's LAMP, after all.
Also speed isn't that huge of a deal given its primary usage. In fact, it actually does better than Python 3 at arithmetic (http://benchmarksgame.alioth.debian.org/u32/benchmark.php?test=all&lang=python&lang2=php), although that may be because memory is the limit in Python 3 compared to PHP's hardcoded 32/64-bit values.