Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide


  1. 1. Before we start
  2. 2. PHP is used by 77.9% of all the websites whose server-side programming language is known
  3. 3. WordPress is used by 16.6% of all the websites in the world
  4. 4. Top three CMSes, for the websites that use a monitored content management system ● Wordpress is first with 54.3% ● Joomla is second with 9.2% ● Drupal is third with 6.8% Three products written in PHP
  5. 5. PHP must have done something right, no?
  6. 6. PHP is probably not the best designed language in the world, but it lets you get things done, and you can't argue with that
  7. 7. History of PHP
  8. 8. PHP History ● Created in 1994 by Rasmus Lerdorf ● 3.0.x released on 20 Oct 2000 ● ● 4 Released on 22 may 2000 and maintained till 4.4.9 which was released 7 august 2008 5 Released 13 July 2004 and is still maintained. Current version is 5.5.5, released 17 Oct 2013 ● Average every few months there is new release. ● more than 150 extensions
  9. 9. Release History Officially called "Personal Home Page Tools (PHP Tools)". This is the first use of the name "PHP". 1.0 1995-06-08 2.0 1997-11-01 3.0 1998-06-06 Development moves from one person to multiple developers. Zeev Suraski and Andi Gutmans rewrite the base for this version 4.0 2000-05-22 Added more advanced two-stage parse/execute tag-parsing system called the Zend engine 4.1 2001-12-10 Introduced 'superglobals' ($_GET, $_POST, $_SESSION, etc.) 4.2 2002-04-22 Disabled register_globals by default. 4.3 2002-12-27 Introduced the command-line interface (CLI), to supplement the CGI 4.4 2005-07-11 Fixed a memory corruption bug, which required breaking binary compatibility with extensions compiled against PHP version 4.3.x 5.0 2004-07-13 Zend Engine II with a new object model. 5.1 2005-11-24 Performance improvements with introduction of compiler variables in reengineered PHP Engine. Added PHP Data Objects (PDO) as a consistent interface for accessing databases 5.2 2006-11-02 Enabled the filter extension by default. Native JSON support.
  10. 10. Release History 5.3 2009-06-30 Namespace support; late static bindings, Jump label (limited goto), Native closures, Native PHP archives (phar), garbage collection for circular references, improved Windows support, sqlite3, mysqlnd as a replacement for libmysql as underlying library for the extensions that work with MySQL, fileinfo as a replacement for mime_magic for better MIME support, the Internationalization extension, and deprecation of ereg extension. 5.4 2012-03-01 Trait Support, short array syntax support. Removed items: register_globals, safe_mode, allow_call_time_pass_reference, session_register(), session_unregister() and session_is_registered(). Built-in web server. Several improvements to existing features, performance and reduced memory requirements. 5.5 2013-06-20 Support for generators, finally blocks for exceptions handling, Zend Optimizer+ bundled in official distribution.[39] 5.6 No date set Internal operator overloading, GMP changes 6 No date set Although internally commenced in 2007, the development of PHP 6 has been delayed because in 2010 the developers decided to cancel their implementation of instance Unicode and introduce UTF-8 support throughout the entire framework. Most other updates that were intended for PHP 6 were added to PHP 5.3.0 (namespace support, late static bindings, lambda functions, closures, goto) and 5.4.0 (traits, closure rebinding) instead.
  11. 11. PEAR PHP Extension and Application Repository ● ● ● PEAR was born in discussions held in the PHP Developers' Meeting (PDM) held in January 2000 in Tel Aviv. It was created by Stig S. Bakken, and is dedicated to his first-born daughter, Malin Bakken. Since early 2000, PEAR has grown to be a big, significant project with a large number of developers working on implementing common, reusable functionality for the benefit of the entire PHP community. PEAR today includes a wide variety of infrastructure foundation classes for database access, content caching, mathematical calculations, eCommerce and much more. 595 Packages on site and 769 developers http://pear.php.net/
  12. 12. PECL PHP Extension Community Library ● ● ● conceptually very similar to PEAR, and indeed PECL modules are installed with the PEAR Package Manager contains C extensions for compiling into PHP spun off from the PEAR Project in October 2003. Originally it was called the PEAR Extension Code Library, but it now operates independently of PEAR. http://pecl.php.net/
  13. 13. PHP Quality Assurance Initiative It was set up in the summer of 2000 in response to criticism that PHP releases were not being tested well enough for production environments. The team now consists of a core group of developers with a good understanding of the PHP code base. These developers spend a lot of their time localizing and fixing bugs within PHP http://qa.php.net/
  14. 14. PHP-GTK ● ● solution for writing client side GUI applications. It was written with look to PyGtk and help from James Henstridge, the author of PyGtk.
  15. 15. Market position Popular sites using PHP ● Facebook.com ● Wikipedia.org ● Qq.com ● Twitter.com ● Taobao.com ● Wordpress.com ● Sina.com.cn ● vk.com ● Mail.ru ● Weibo.com
  16. 16. PHP usage Source: Netcraft
  17. 17. PHP for Andoid Thanks to Google-mainteined project SL4A http://www.phpforandroid.net/doku.php
  18. 18. Build system Phing features: ● Simple XML buildfiles ● Rich set of provided tasks ● PHing Is Not GNU make; it's a PHP project build system or build tool based on Apache Ant. ​ You can do anything with it that you could do with a traditional build system like GNU make, and its use of simple XML build files and extensible PHP "task" classes make it an easy-touse and highly flexible build framework. Easily extendable via PHP classes ● Platform-independent: works on UNIX, Windows, Mac OSX ● No required external dependencies ● Built for PHP5 ● Installation through PEAR channel Analogs: ● Fabric ● Capistrano ● Fredistrano
  19. 19. Accelerators ● E-Accelerator ● ionCube PHP Accelerator ● Windows Cache Extension for PHP ● Alternative PHP Cache
  20. 20. HipHop Virtual Machine for PHP HHVM is a new open-source virtual machine designed for executing programs written in PHP. It uses a just-in-time compilation approach to achieve superior performance while maintaining the flexibility that PHP developers are accustomed to. To date, HHVM (and its precedessor HPHPc before it) has realized over a 9x increase in web request throughput and over a 5x reduction in memory consumption for Facebook compared with the Zend PHP 5.2 engine + APC. HHVM can be run as a standalone webserver (i.e. without the Apache webserver and the "modphp" extension). HHVM can also be used together with a FastCGI-based webserver, and work is in progress to make HHVM work smoothly with Apache. https://github.com/facebook/hhvm
  21. 21. Database ● PHP Toolkit for ADO .NET Data Services allow php developers use data sources created with ADO .NET Data Services. ● Propel ORM framework for php5, with simple API to store and retrieve data. ● ADOdb An object oriented library written in PHP that abstracts database operations for portability. It is modelled on Microsoft's ADO, but has many improvements that make it unique (eg. pivot tables, Active Record support, generating HTML for paging recordsets with next and previous links, cached recordsets, HTML menu generation, etc). ● Doctrine ORM for PHP 5.2.3+, created upon DBAL. One of the features is possibility to write queries on object-oriented SQL dialect – DQL, created with inspire of Hibernate HQL.
  22. 22. DEBUG ● Xdebug Debugger and Profiler Tool Xdebug is one of the most popular debugging PHP extensions. It provides a ton of useful data to help you quickly find bugs in your source code. Xdebug plugs right into many of the most popular PHP applications, such as PHPEclipse and phpDesigner. ● Gubed PHP Debugger As the name implies, Gubed PHP Debugger is a PHP debugging ● PHP_Dyn PHP_Dyn is another excellent PHP debugging tool that’s the argument and return values of your functions. ● open-source. You can trace execution and get an output of FirePHP ● tool for hunting down logic errors. DBG – PHP Debugger and Profiler PHP_Debug is an open-source project that gives you useful information about your PHP code that can be used for debugging. It can output processing times of your PHP and SQL, check the performance of particular codeblocks and get variable dumps in graphical form, which is great if you need a more visual output than the one given to you by print_r() or var_dump().
  23. 23. Testing ● PHPUnit ● SimpleTest ● vfsStream
  24. 24. Google likes it
  25. 25. Frameworks
  26. 26. Template engines Fenom
  27. 27. Composer Dependency Manager for PHP Composer is a tool for dependency management in PHP. It allows you to declare the dependent libraries your project needs and it will install them in your project for you. This idea is not new and Composer is strongly inspired by node's npm and ruby's bundler. But there has not been such a tool for PHP.
  28. 28. Yes, PHP has a better dependency manager than any other languages.
  29. 29. Main features: Zephir Both dynamic/static typing ● Reduced execution overhead compared with full interpretation ● ● Restricted procedural programming, promoting OOP ● Memory safety ● Ahead-of-time compiler Compiler design goals: ● ulti-pass compilation ● Type speculation/inference ● Allow runtime profile-guided optimizations, pseudo-constant propagation and indirect/virtual function inlining Ze(nd Engine) Ph(p) I(nt)r(mediate) is a high level language that eases the creation and maintainability of extensions for PHP. Zephir extensions are exported to C code that can be compiled and optimized by major C compilers such as gcc/clang/vc++. Functionality is exposed to the PHP language.
  30. 30. Github Stats TOP 5 languages TOP 5 languages #repositories created 2012 #repositories created 2013 ● Ruby ● JavaScript ● JavaScript ● Ruby ● Java ● Java ● C ● PHP ● PHP ● Python Github Archive, a dataset of Github events queryable using Google BigQuery ADAM BARD