What is php?

PHP  is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML.

PHP has many open-source libraries included with the core build, and many more are readily available. Extensions exist to help PHP interface with a number of systems, including IRC, a number of compression formats, and Windows API. Other extensions exist to let PHP generate file formats on-the-fly, such as a popular extension which allows PHP to create Macromedia Flash movies.

Unlike many languages, such as C# or Perl, which have primarily a following of more generalist programmers, many PHP programmers know no other language. This occasionally causes it to be dismissed as a lesser language, but its growing popularity and the many robust and efficient sites built using it as a structure seem to dispel this myth.

PHP has occasionally been criticized for what are viewed by some as security flaws, in comparison to languages such as ASP. A lack of easily understandable error messages, a sometimes overly robust configuration file, and an obviously incomplete set of built-in functions are also pointed to as areas which could use marked improvement.

Why Use PHP?

If you need to embed dynamic text into static text, you’ll find PHP extremely useful. It was designed for this, and it excels at it. PHP is also very useful for integrating web pages with databases.

The PHP scripting language resembles JavaScript, Java, and Perl, These languages all share a common ancestor, the C programming language.

PHP is most different from JavaScript and Java. PHP is a server-side scripting language. All of the “work” is done on the server. JavaScript (and Java) generally run on the client. They have little access to the information that the server has, and mediated access to information on the client. They can do lots of things on the client that PHP cannot. PHP has full access to the information that the server has, and very little access to information that the client has. In fact, it only has information that the client tells the server and that the server passes on to PHP. Because it is on the server, however, PHP cannot be modified by the client. While you cannot necessarily trust the information that the client gives to PHP, you can trust that your PHP is doing what you told it to do. Because PHP is on the server end, your PHP scripts can affect your server--such as by keeping an activity log or updating a database.

PHP and Perl often work side-by-side. These are both server-side. Where PHP excels at embedding dynamic content, Perl excels at modifying (or “filtering”) streams of text. PHP excels at putting things into documents, and Perl excels at finding things in documents. After you have learned PHP, you may well find Perl useful for many tasks, especially for command-line tasks. PHP has an advantage over Perl on most web sites because PHP is usually loaded as part of the web server. When scripting languages “run”, the system has to first load the “interpreter” and then “compile” the language into code that the machine can understand. When you tell PHP to echo the current time to the web page, the computer needs to have your command translated into numbers that it can understand. Because the PHP interpreter is already loaded as part of the web server’s software, it is always running. This cuts out half of that process. The interpreter is already loaded, and it can go directly to compiling the language into code. When web servers see a request to run a Perl script, they usually have to first load the Perl interpreter. This happens very quickly, but when there are thousands or tens of thousands of requests coming every second, every “very quickly” can add up.

C programs are “pre-compiled”. They cut out both steps in that process: no interpreter is needed because the program is already compiled into code the machine understands. Because of this, however, C programs must be compiled every time you switch to a new machine. If you move to a different host, you will usually have to recompile your C programs. Sometimes you’ll even have to recompile your C programs when your ISP upgrades their server’s system software. And many ISPs do not provide you with a C compiler. You’ll find that PHP is more “portable” than C in this respect: if it works on one server, it will usually work on any other server that has it. Most ISPs that provide server-side scripting provide PHP.

PHP in web designing

PHP and MySQL when used together become powerful tools that are used to create dynamic and interactive websites. Both are opensource tools and can be easily acquired for free.

The information you'll find on this website is for novices. We don't claim to be experts on the subject and our intention is to help the less technical minded website developer to become familiar with PHP and MySQL.

If your purpose in learning PHP/MySQL is to develop an interactive website, there is now a much easier way to accomplish the task.

The new trend is to use TREADY, TYPO-3, etc,.

Tready is a custom made simple CMS developed by Tryangled Solutions Pvt Ltd. This has a simple interface through which a non computer savy person can change the contents and work around easily.