Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 654 Vote(s) - 3.53 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What should every PHP programmer know?

#11
**The PHP Language**

Go to PHP.net and read through all of the documentation. When you are done, you won't know everything you need to know about php, but you will know where to look.
Reply

#12
All good answers, but there is something important missing: If you want to seriously get into PHP, then you should be aware that there are a lot of PHP programmers out there who are lazy, inept, ignorant, misguided and unfortunately get their code released to the public. The history of PHP means that it supports some questionable features (not just things like register_globals but also smaller things like automatic initialization) and people still use them. You don't want to.

Reply

#13
I would say a basic one would be HTML. ;)
Reply

#14
Be careful of code snippets you find on the web. Often they contain sql in html, which is bad practice, as well as security vulnerabilities such as sql injection. I've seen few that use prepared statements, which is good for security.
Reply

#15
Ignore the mysql_\* functions. Not only do they provide no straightforward method of writing secure code, they actually go out of their way to make it [painful and tedious][1] if you try. Use mysqli or PDO instead (and you've got no excuse now - PHP 4 was end-of-life'd months ago).

[1]:

[To see links please register here]

Reply

#16
**Getting a web server setup**

To run PHP and MySQL locally on your computer you will need to install Apache webserver with php module and MySQL database server. ie. a LAMP webserver (Linux Apache MySQL PHP).

In the past, I would recommend installing Ubuntu. These days, there are a few solutions available that will give you one click installation webserver without using linux.

For Windows:
[

[To see links please register here]

][1]

For OSX:
[

[To see links please register here]

][2]


After having a LAMP webserver use [w3schools.com][3] tutorials to start.


[1]:

[To see links please register here]

[2]:

[To see links please register here]

[3]:

[To see links please register here]

Reply

#17
1. No Php framework expert.As templating which make the system much complex then as it.
2. Understand business logic requirement and think the cons/pro.Hoping for SA to think all for you is not good programmer.
3. No ajax.I dealing with large of data,rendering to one js file about 4000 k data is very bad.
4. Start from notepad or VI
5. After learn php about 1 to 2 years,try learn other language like c# or c++ to improve your php application.
6. Php is addicted language rather then other language.You type it works.Other language,you type It's Compile It's Hang up.
7.For complexity application,php is the best to me rather then other language,because you think,you write it works.
Reply

#18
Personally, I found the book "[Build your own database driven website using PHP and MySQL][1]" extremely helpful.

Other than that, the one thing I found hardest to get used to with PHP is how relaxed it is, compared with any other language I've ever used. By that I mean no types, flexibility about syntax and punctuation. Personally I think that's a good thing, but I also know that it probably encourages pretty bad behavior.

Here's one other tip I have: try to use something like the DRY principle -- i.e., you'll find yourself writing the same little (or big) bits of code over and over again -- make them into functions as early as you can in the process of coding, and life will be a lot easier later on.


[1]:

[To see links please register here]

Reply

#19
PHP was my first language, which I learned on the side while working as an office junior in my first job over 10 years ago. Here is some things from my experience:

* **Download the PHP manual, print it off, and start reading from page one. Keep going till you're at the end.** Skim over the bits you probably won't need (like using KADM5 or Hyperwave) but always read the introductions so you know what PHP is capable of (this will save you trying to re-invent the wheel). The PHP documentation blows the docs of pretty-much every other language I've worked with since out of the water.
* Next step; **set up PHP. Manually.** Don't use XAMPP or anything else, *do it yourself*. It always helps to know how your environment is set up.
* **Don't bother with an IDE** at the beginning. Getting to know a language means getting up-close-and-personal. IDEs obscure things in an attempt to help you GetThingsDone which works great when you know what you're doing and know your target environment, but when you're starting out they just get in the way and hide what's important.
* **Don't bother with frameworks** at the beginning, either. Again, they're there to help you GetThingsDone which only works when you know what you're doing in the first place. Start with the basics, otherwise you'll be learning the *framework* and not PHP.
* **PHP is essentially an advanced templating engine**. Don't fall into the trap of over-hyped "PHP templating engines". They're just doing what PHP already does, doubling-up on the work and running twice as slow as PHP does. Stick with inline html/php to start with. Again, this'll help you get to understand what PHP is, how it works, and when to use it.
* As with AJAX and CSS... they're nothing to do with PHP, but with the output you produce from PHP (and with AJAX getting input in). **Don't load your plate with too much to eat at once.** Start with plain PHP+HTML, and do your CSS by hand. Then, when you're happy, mix in a little javascript.
* The best thing you can do with *any* language is **learn the environment** you're going to be working in, because programming is (relatively) similar across all of them. They all have loops, data structures, input/output, etc, but they all work just that little differently.
* **Don't believe the hype.** I'm moving from PHP to Python at the moment and I could've just jumped on the Django band-wagon to GetThingsDone, but I know that if I came across a problem I wouldn't know where to begin to fix it. So I'm taking my own advice and starting from the beginning; reading the manual, setting up an test system, parsing simple files, getting input/output, getting it linked in with a web server... all part of getting to know my new environment.
Reply

#20
> What should every PHP programmer know ?

You need to know a language that is not PHP. I'm not saying you shouldn't develop your sites in PHP, it's actually really good for that, but you really need to know at least one other language to get some perspective.

Why? PHP is broken and full of bad design and misfeatures. You can write excellent code in PHP, but you're never going to be able to spot the bad design and failures of PHP itself if you don't know any better.

I'd suggest python, ruby, or C#

PS: If you don't think this is a helpful suggestion, then by all means downmod this answer, but if you are downmodding because you feel insulted by my claim that PHP is broken and badly designed, don't shoot the messenger, I'm just telling the truth!
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through