Top Banner
LeoNguyen.com
39

PHP Lab

May 10, 2015

Download

Technology

Leo Nguyen

PHP Lab
http://leonguyen.com
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 2: PHP Lab

Outline

- References- Library- Framework- Optimization- Profiling- Performance

Page 3: PHP Lab

References

Page 4: PHP Lab

References

- PHP Manual (www.php.net/manual/en/)- W3Schools (www.w3schools.com/php/)- PHP Result (phpresult.com)- PHP Master (www.sitepoint.com/php)- Advanced PHP Tutorial (advancedphptutorial.blogspot.com)- TekBrand (tekbrand.com/category/php)- Idio Techie (idiotechie.com/category/php/)- PHP: The Right Way (www.phptherightway.com)- PHP CMS Framework (phpcmsframework.blogspot.in)- PHP Classes (www.phpclasses.org)- JREAM (bit.ly/17dGSm3)- Aman Virk (bit.ly/141XDMT)

Page 5: PHP Lab

Library

Page 6: PHP Lab

Eden

- eden.openovate.com

Page 7: PHP Lab

PHP Login Script

- www.php-login.net

Page 8: PHP Lab

Library

- Fvalidate (bit.ly/14wNeMS)- Rapid Form Builder (bit.ly/19H8wIj)- Simple Authentication and Security Layer (bit.ly/14wNOdF)- Access user Class (bit.ly/1dgK3O9)- .passport Client (bit.ly/16C2GmX)- .passport Server (bit.ly/1dgL5tk)- URL Router Class (bit.ly/17XrM24)- Captcha: KCaptcha (www.captcha.ru/en)- PDF: mPDF (www.mpdf1.com/mpdf)- File Manager: elFinder (elfinder.org)- Rss: SimplePie (www.simplepie.org)- Chart: jpChart (jpgraph.net)- Code Generator: jqmphp (www.jqmphp.com)

Page 9: PHP Lab

Framework

Page 10: PHP Lab

Phalcon

- phalconphp.com

Page 11: PHP Lab

Optimization

Page 12: PHP Lab

References

- Google Developers (bit.ly/1bYoVvf)- Nettuts+ (bit.ly/18F1zHi)- Saiful Islam (bit.ly/15T2WQd)- Clay (bit.ly/1bYmSYd)- MD Pro (bit.ly/14UfGJG)- Chazzuka (bit.ly/16m3IoQ)

Page 13: PHP Lab

Profiling

Page 14: PHP Lab

Outline

- Lab 01: Using microtime()- Lab 02: Using APD (Advanced PHP debugger)- Lab 03: Using XDebug

Page 15: PHP Lab

References

- Simplest way (bit.ly/11lodT2)- APD-Advanced PHP Debugger (bit.ly/15mwKFZ, bit.ly/1aOwnGe)- WinCacheGrind (bit.ly/1bYnYmR)- WebGrind (bit.ly/11lo9Tl)- Quang (VN) (bit.ly/176Uc8g)

Page 16: PHP Lab

Lab 01

Using microtime()

Page 17: PHP Lab

Task 1: Enter code

- Enter code: https://gist.github.com/leonguyen/6097052

Page 18: PHP Lab

Task 2: Run

- Goto http://localhost/phplab/microtime.php.

Page 19: PHP Lab

Lab 02

Using APD

Page 20: PHP Lab

Task 1: Donwload php_apd.dll

- Goto: bit.ly/1c11scV and download php_apd.dll to '<web-server>\php\ext' folder.

Page 21: PHP Lab

Task 2: Config php.ini

- Open 'php.ini' file and enter code: https://gist.github.com/leonguyen/6097199.

Page 22: PHP Lab

Task 3: Check phpinfo()

Page 23: PHP Lab

Task 4: Program

- Enter code: https://gist.github.com/leonguyen/6097246.

Page 24: PHP Lab

Task 5: Run

- Goto http://localhost/phplab/apd.php.

Page 25: PHP Lab

Task 6: Profiling

- Open folder 'tmp' folder to view profiling files.

Page 26: PHP Lab

Lab 03

Using XDebug

Page 27: PHP Lab

Task 1: Config php.ini

- Open 'php.ini' file and enter code.

Page 28: PHP Lab

Task 2: Check phpinfo()

Page 29: PHP Lab

Task 3: Program

- Enter code: https://gist.github.com/leonguyen/6097335.

Page 30: PHP Lab

Task 4: Run

- Goto http://localhost/phplab/xdebug.php?XDEBUG_PROFILE=true.

Page 31: PHP Lab

Task 5: Profiling files

- Open folder 'tmp' folder to view profiling files.

Page 32: PHP Lab

Task 6: Profiling with WinCacheGrind

- Goto and download http://sourceforge.net/projects/wincachegrind/.

Page 33: PHP Lab

Task 7: Using WinCacheGrind

- Open folder 'tmp' folder to view profiling files.

Page 34: PHP Lab

Task 8: Profiling with WebGrind

- Goto and download https://github.com/jokkedk/webgrind.

Page 35: PHP Lab

Task 9: Using WebGrind

- Goto http://localhost/webgrind/.

Page 36: PHP Lab

Performance

Page 37: PHP Lab

References

- Performance Tips (bit.ly/12Sx7Fh)- Cache Performance Comparison (bit.ly/1bu5gUW)- Cache it! (bit.ly/1bu5zz2)- W3 Total Cache (bit.ly/1bu5Z8l)- Cache with CI (bit.ly/16m79Mk)- Memcache with CI (bit.ly/13NOpqa, bit.ly/16aYDls, bit.ly/176TMyA)- Quang (VN) (bit.ly/12rQev1)

Page 38: PHP Lab

Others

Page 39: PHP Lab

API- Zippopotam (http://www.zippopotam.us)- Mailgun (http://www.mailgun.com)- Hoiio (http://content.hoiio.com)- EXIF data (http://www.exif.in)- Doc Converter (http://www.docverter.com)- deviantART muro (http://deviantart.github.com/jquery.deviantartmuro)