Archive for May, 2008

What’s New with PHP?

4.png Many web designers and programmers are in the look out for the latest PHP6. But there is no need to torture yourself for waiting that long. Everything that is expected to come out in PHP 6 can also be expected from PHP 5.3.
This will be such a good news for those programmers who want to use the new features, but their hosting providers are not yet ready for an upgrade to PHP 6 soon. Many companies will probably wait for 6.1 to be released before upgrading.
The new features offered by PHP 5.3 are namespaces, late static binding mysqlnd.

What is PHP Programming?

PHP is an acronym for Hypertext Preprocessor, used to design for designing web pages that are dynamic.
It was originally created by Rasmus Lerdorf in 1995 but is now produced and maintained by The PHP Group. It is considered as a free software by the Free Software Foundation.
It is widely-used as scripting language for web development and can be embedded into HTML. It has PHP codes as an input, and the web page as an output and it runs on a web server.
PHP began on 1994 and originally stood for Personal Home Page. The tools that Lerdorf created was used to display his resume on his webpage and to keep track of the traffic that his webpage is getting.

Web Page Parsing

3.png When writing an internet address in the address bar of the browser and clicking enter to start going to that address, you send a request to the web server and it will follow the address of the URL and will pick up all the contents of the target location.
Always keep in mind that whatever you see in the browser an output of the HTML of the actual code of the web page that you have requested.
What is parsing? It is the process of converting of the code to the HTML that you desire by the engines of the web parser’s servers.
When requesting the URL, the web server will follow the location and request for the contents in that server.

Starting and Ending Tags

Like in other languages, PHP codes always start with tag.

One example of a code is written below:

echo "PHP ! I am gonna get you.";
?>

The above code contains only three lines. We started the code with the like mentioned in the first sentence. The ECHO code helps you display combinations of strings and variables in your desired page. Always remember that whatever you want to display in your page must start and end with a double quotation mark. The semi-colon (;) is essential and means that it is the end statement in an PHP code.

SMARTY – The PHP Template Engine

2.jpgSmarty, unlike FastTemplate and patTemplate or other compilers, compiles the template that you have created into PHP scripts. It is very suitable and recommended for large applications and even for websites with high traffic.
Smarty parses the templates that you have created and starts creating PHP scripts from the templates, instead of binaries. When the webpage is viewed, Smarty reads from the PHP scripts, which is efficient and will avoid you from parsing your templates again. When editing the templates, Smarty recompiles the templates when you make change son them, thus eliminating your worry from manually compiling the templates yourself.

PHP Basics

1.jpgPHP or Hypertext Preprocessor is an HTML embedded scripting language that is used to create web pages that are dynamic. The PHP script is embedded in an HTML document.

PHP offers advantages like cross-platform operability, it is compatible with a wide range of data bases, most current web servers support this, communicates with a large number of network protocols, not limited to output that are HTML, and it has a strong capability of processing texts.

You need to install the processor of PHP and have your server be associated with .php files. When PHP is already installed in your computer, what you need to do now is to place the php files in the web directories and they will be automatically parsed whenever someone visits that page.