110 likes | 253 Views
Programming Language. PHP. Chokechai Chuchokechai 48540439. PHP - history.
E N D
Programming Language PHP Chokechai Chuchokechai 48540439
PHP - history • PHP is a language for creating interactive web sites. It was originally called "Personal Home Page Tools" when it was created in 1994 by RasmusLerdorf to keep track of who was looking at his online resume. Mid-1997: Technion students AndiGutmans and ZeevSuraskiredesigned the PHP language engine and wrote some of the most popular PHP modules.
History (con) • At that time PHP already had its own site, php.net, run by the computer science community, and was powering thousands of Web sites. The script was just beginning to be recognized by developers who preferred the multi-platform script over its more limited Microsoft ASP counterpart that interfaces only with Windows NT. Today PHP Web developers applaud the script's simplicity, flexibility, and ability to generate HTML pages quickly. Over 5,100,000 (1/2001) sites around the world use PHP.
Developer of PHP • Zeev Suraski, Israel Andi Gutmans, Israel Shane Caraveo, Florida USA Stig Bakken, Norway Andrey Zmievski, Nebraska USA Sascha Schumann, Dortmund, Germany Thies C. Arntzen, Hamburg, Germany Jim Winstead, Los Angeles, USA Rasmus Lerdorf, North Carolina, USA
Advantages • Less Code, More Function. • It tries to eliminate side effects, which are a common source of odd behaviour (bugs). • It tries to focus on the intent of a computation without getting bogged down in the algorithms.
Target User • Webmaster • Web designer • Administer
Target User(con) • PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. PHP generally runs on a web server, taking PHP code as its input and creating Web pages as output. However, it can also be used for command-line scripting and client-sideGUI applications. PHP can be deployed on most web servers and on almost every operating system and platform free of charge. The PHP Group also provides the complete source code for users to build, customize and extend for their own use.
example1 • <html> <head></head> <body> <?= "Hello world!" ?><br> </body>
example2 • <? $x = "Hello "; $x.= "wrold!"; $x = 10; $x++; $x *= 5; $x = array(1,3,2,4,10); $x = array( "a" => "4", "i" => "1", "e" => "3", "later" => "l8r" ); ?>
example3 • <? $x = false; # boolean$x = true; $x = 10; # decimal $x = 1.45; # Floating point $x = 0x1A; # hexadecimal $x = "mmm\"oo'oo\n"; # string = mmm"oo'oo +return in the end of the line $x = 'mmm"oo\'oo\n'; # string = mmm"oo'oo\n $y = &$x # Reference $x[1] = 10 # array of decimals $x["name"] = "shlomi"; # associative arrays $arr[] = "lalala"; # push "lalala" $x[2]["lala"] = "xx"; # two dimensional $name = "shlomi"; $animals = array("dog" => "azit" , "cat" => "mitzi"); echo "hello ! My name is $name and my dog's name is ${animals['dog']}"; ?>
Reference • http://www.haifux.org/lectures/43/slide7.html • http://www.google.com