php code, upload it to a server and execute it with an interpreter like Apache or nginx . PHP can also be used to build command line apps (just like bash, Ruby or Python) PHP
CGI scripts to track visits to his online resume. How it started He named this set of CGI scripts by “Personal Home Page Tools” After that he developed this collection to become a Full programming language with more consistent syntax and OOP support
CGI scripts to track visits to his online resume. How it started He named this set of CGI scripts by “Personal Home Page Tools” After that he developed this collection to become a Full programming language with more consistent syntax and OOP support After that they launched PHP 3 under the name of Hypertext Preprocessor
(Wikipedia, Facebook, Yahoo!…) The present of PHP Nowadays: no FTP, version control software like Git helps maintain and track entire codebase Local environment identical to production with tools like Vagrant, Chef, Puppet…
(Wikipedia, Facebook, Yahoo!…) Composer as a dependency manager The present of PHP Nowadays: no FTP, version control software like Git helps maintain and track entire codebase Local environment identical to production with tools like Vagrant, Chef, Puppet…
virtual hierarchy +PVTQFWEGFKP 2*2 Just like operating system’s filesystem directory structure Avoid any conflict with any class names used by another developers
new Symfony\Component\Httpfoundation\Request; <?php use Symfony\Component\Httpfoundation\Request; use ENSAT\Routing\Response; $request = new Request; $response = new Response; $response = new ENSAT\Routing\Response;
new Symfony\Component\Httpfoundation\Request; <?php use Symfony\Component\Httpfoundation\Request; use ENSAT\Routing\Response; $request = new Request; $response = new Response; $response = new ENSAT\Routing\Response; <?php use constant ENSAT\CONT_NAME; echo CONST_NAME;
new Symfony\Component\Httpfoundation\Request; <?php use Symfony\Component\Httpfoundation\Request; use ENSAT\Routing\Response; $request = new Request; $response = new Response; $response = new ENSAT\Routing\Response; <?php use constant ENSAT\CONT_NAME; echo CONST_NAME; 2*2
$coolClass = new AbstractSingletonProxyFactoryBean; <?php use Acme\Subnamespace\AbstractSingletonProxyFactoryBean as TheCoolClass; $coolClass = new TheCoolClass;
that encapsulates its surrounding state at the time it is created. • The encapsulated state exists inside the closure even when the closure lives after its original environment ceases to exist.
that encapsulates its surrounding state at the time it is created. • The encapsulated state exists inside the closure even when the closure lives after its original environment ceases to exist. • Anonymous functions • Can be assigned to variables and passed around just like any other PHP object • They are actually objects : instances of the Closure class
($name) { return sprintf('%s, %s', $name, $doCommand); }; } // Enclose “Mustapha" string in closure $person = enclosePerson('Mustapha'); // Invoke closure with command echo $person('get me some coffee!'); // Outputs --> "Mustapha, get me some coffee!” Attaching state to closures :
code that helps solve a specific problem Good components are : • Laser-focused • Small • Cooperative • Well-tested • Well-documented %QORQPGPVUXU(TCOGYQTMU
Josh Lockhart https://github.com/ziadoz/awesome-php A curated list of amazingly awesome PHP libraries, resources and shiny things. https://github.com/phptodayorg/php-must-watch List of interesting conference talks and videos on PHP
Josh Lockhart https://github.com/ziadoz/awesome-php A curated list of amazingly awesome PHP libraries, resources and shiny things. https://github.com/phptodayorg/php-must-watch List of interesting conference talks and videos on PHP https://laracasts.com/ The best PHP screencasts on the web