PHP Self-learning to advance the advanced route

Source: Internet
Author: User
Tags apc apd php oop mysql insert php debug php debugger php framework zend framework

In order to own the PHP system in-depth mastery, I through personal experience, as well as search online expert experience, summed up a PHP self-learning route planning, including actual combat drills, learning suggestions, master Advanced, FAQs and test summary of five pieces. It is a systematic learning plan and goal.
Avoid blindly learning, to improve some guidelines. Hope to self-pressurization, through the efforts to achieve the master level of cultivation. Tiandaochouqin, self-encouragement! This route is for me only.

Part of the blog, see: "Original" PHP Programmer's technical growth planning
This PHP growth plan is clear and professional.

First, actual combat drills

Familiar with grammar &api---Read Zend, CI, wordpress Source, PHP Independent development projects, in-depth understanding of PHP engine implementation details, extension writing, performance optimization, etc.

(1 weeks) html+css HTML5+CSS3
(2-3 days) message board or Notepad, (add and revise, Array function database function)
(7 days) BBS or corporate website, (templates, paging, permissions) Phpchina master PHP lead the way-the problem summary and PHP manual
(1 months) Learn discuz foreign open source program (Zencert Joomla Drupal). Learn the essence of Phpchina.
(1 months) in-depth study of the ZF framework (increased deletion, access control, front-end template page, etc.)
(Long-term summary) to summarize their own small projects, using object-oriented thinking, structural optimization.
See Open source Framework source (This step please look for some small open source framework such as Ci,slim), enhance the understanding of MVC
More in-depth system learning (MySQL Linux C language javascript html CSS Redis etc.)

The most urgent combat:

(2 weeks) 3 stations (at least 20 art pages) PSD to HTML cut exercises.
(1 weeks) jquery combat drills
(January) Use ZF framework to develop modules to achieve flexible control

Knowledge points that must be mastered:

The database must be proficient in MySQL & SQL Server, and must be proficient in zendstdio operations.
Be proficient in phpmyadmin operation.
ADODB (Database Interface) +javascript+xml+ajax (asynchronous JavaScript and XML) +jquery (JS framework),
Familiar with OOP programming, Learning THINKPHP,ZF Framework, Learning smarty template engine, pear (PHP extension and application Library), prototype (design mode).
For Apache, you should also buy this administrator's manual for a good look.
At the same time a general understanding of Linux and so on. and server management operations.

Second, learning suggestions

"Function Reference" that part does not have to look at all, but the date and time, file system, other basic extensions, sessions, variables and types of the recommendations must be doubled, which introduces a lot of commonly used functions and classes.
These functions do not have to remember, as long as there is an impression on the line, in the future when used to come back to turn, with more natural to remember.
Start from the message book, then do a personal blog, and then do a more complex CMS, or small OA, the so-called experience, is actually the solution to the problem, from the project constantly thinking, you can continue to harvest!
Want to learn PHP OOP, directly on the Zend Framework 2, six months later you will feel that you have to step up a lot
Summary: Self-study is very important, practical project experience is also important. Do not assume that computer fundamentals are not important, and learning computer fundamentals is very useful for learning programming languages. As long as the more ruthless, more effort, there is no attack not broken things.

1 Basic PHP Programmer

Focus: LNMP Skilled (core is the basic operation of the installation configuration)
Objective: To complete basic LNMP system installation, simple configuration and maintenance, to be able to do basic PHP development of simple system, to support the development of a PHP function module in PHP medium-sized system.
Basic syntax array, string, database, XML, Socket, gd/imagemgk image processing, and so on; be familiar with the various APIs (MYSQL/MYSQLI/PDO) linked to MySQL, and know the solution to various coding problems Know the regular skilled PHP framework (thinkphp, Zendframework, Yii, YAF, etc.); understand the basic MVC mechanism and why you do it, a little bit about the differences between different PHP frameworks, and the ability to quickly learn an MVC framework. Be able to know the file directory organization in the development project, have the basic good code structure and the style, can complete the small system development and the medium system one module development work.

2 Intermediate PHP Programmer

Focus: Improve the skills for LNMP, can be more comprehensive to the LNMP have skilled application.
Objective: To set up the LNMP environment anytime, anywhere, to quickly complete the general configuration, to trace the most encountered development and online environment problems, to be able to independently assume the framework and development of the medium-sized system, to assume the development of a medium-sized module in a large-scale system;
In addition to the first-stage capabilities, installation configuration is free to install PHP and various third-party extensions of the compiled installation configuration; Understand most of the configuration options and implications of PHP-FPM (such as Max_requests/max_children/request_terminate_ Timeout and the like to affect the performance of the configuration), know the difference between the mod_php/fastcgi, in PHP has been able to master a variety of basic technology, but also a variety of in-depth PHP, including a deep understanding of PHP object-oriented/spl/syntax aspects of special features such as reflection , in the framework has read at least one of the regular PHP MVC framework Code, know the basic PHP framework internal implementation mechanism and design ideas; in PHP development has been able to skillfully use the conventional design pattern to apply development (abstract Factory/SINGLETON/Observer/Command chain/policy/adapter and other modes) , it is recommended that you develop your own PHP MVC framework to fully liberalize your development, allow yourself to understand the MVC pattern, and enable you to quickly upgrade your Business Project development, familiarize yourself with PHP's various code optimization methods, and familiarize yourself with most of the PHP security issues. Familiar with basic mechanism of PHP execution (Zend Engine/extended basic working mechanism);

3 Advanced PHP Programmer

Emphasis: In addition to the basic LNMP program, you can also have in-depth learning in a certain direction or field. (Depth dimension development)
Objective: In addition to the ability to complete basic PHP business development, but also to solve most of the deep and complex technical problems, and can be independently designed to complete the large-scale system design and development work, oneself can hold into a technical direction independently, in this piece of comparative professional. (such as MySQL, Nginx, PHP, Redis, and so on in any direction in-depth research)
As a basic core skill, we need more in-depth learning and application on the basis of the second stage. From the basic code application above, can solve the PHP development encountered 95% of the problem, understand most of the PHP skills, for most of the PHP framework can be quickly used in a day, and understand the pros and cons of various mainstream PHP framework, can quickly facilitate project development to do technology selection; In addition to the general second stage of knowledge, you will learn some of the more biased gate configuration options (PHP auto_prepend_file/auto_append_file), Includes some complex advanced configurations and principles in the extension (such as the memcache.hash_strategy in the memcached extension configuration, apc.mmap_file_mask/apc.slam_defense/in the APC extended configuration Apc.file_update_protection and so on), the working mechanism of PHP, including the PHP-FPM work mechanism (such as PHP-FPM under different configuration machine to open process number calculation and principle), Zend Engine has a basic familiarity (vm/gc/ Stream processing), read the basic PHP kernel source code (or read the related article), the most core data structure of PHP internal mechanism (basic type/array/object) implementation has the understanding, for the core infrastructure (zval/hashtable/ GC) with in-depth learning, ability to perform basic PHP extension development, understanding of some advanced knowledge of extended development (minit/rinit, etc.), familiarity with PHP and apache/nginx different communication interaction details (MOD_PHP/FASTCGI) In addition to developing PHP extensions, consider learning to develop Zend extensions to understand PHP from a lower level.


Third, the Master advanced

English good words recommended see version, although to pay (annual pay $15/month), but you will get more.
I have been paying for two years, the first to learn PHP, and then follow the framework of CI, laravel, and then learn jquery, ANGULARJS, etc., are in the actual application of the project, Ror, Nodejs also followed the study, but no opportunity to use.
Foreign masters do not only teach the teaching schedule reasonable, faster pace, do not waste your time and allow you to maintain a high concentration of attention, and can see the master's programming habits and tools, learning is the industry's newest things, such as the workflow of various editors, seconds to kill the country Phper video.

Study the PHP kernel
PHP Technical Architecture
Best to participate in PHP open source projects

Iv. Frequently Asked Questions

Technical line (partial depth):
1. Basic knowledge, such as data structure, multi-threading, i/o,http protocol, etc.
2. Language depth, such as PHP operating mechanism, performance optimization, APC (and its principle, etc.)
3. Source reading, such as see what framework, the mechanism is how, to the fine asked
4. Knowledge width, static language, such as C, Java, etc., I always feel that only a language is not a good thing


1. Look at your CV and ask about the user volume, PV, throughput, difficulties and solutions of past projects.
2. Database design experience, why do the sub-table? The Sub-Library?
How much data do you usually start a table? The Sub-Library? What is the purpose of the sub-list? What is a vertical split of a database? Split horizontally? Partition, etc.? An example can be illustrated
3. What are the database optimizations? What should we pay attention to separately?
What caches are encountered in 4.web development? How to optimize separately?
5. Give you 256M of memory, the 10G of the file to sort (the file 1 numbers per line), how to achieve?
How do I find a 10G file to implement?
How often do I count the number of occurrences of each keyword in a 10G file?
6. If you are now the 12306 train ticket designer, how do you design to meet the National people booking?
7. If there are 100 million users, what is your server architecture? How is the storage scheme for user information designed?
8. If you are a technical leader, the progress of the team task will not be completed how can you solve?
If you insert a task with a full schedule, how do you ensure that the overall progress is not postponed?
If some engineers do not complete the scheduled task today, how can you solve it?
9. Talk about how to build a high-performance Web site from your experience? What are the steps required? Steps? What do you need to be aware of and how to optimize each step?
10. Why is the master-slave separation of the database?
11. How to handle multi-server sharing session?
12. A 10G table, you use the PHP program to count the number of occurrences of a field, the idea is?
13. Will tell you a Nginx log example, in your opinion of the best programming language for the HTTP response time more than 1 seconds of the first 10 URLs?
14. Give you a MySQL config file that resolves the file in the programming language you think is the best?
15. Give you two paths A and B, write an algorithm or idea to calculate a and B gaps and show the intersection of A and b?
16. Give you a URL, in nginx configuration rewrite specified to a specific path?
17. What is the interpretation process for a PHP file? What is the general acceleration of PHP? What technologies are used to improve overall PHP performance?
What is the difference between session and cookie life cycle? Storage location differences?
Require, include, require_once, include_once difference? Load difference? If the program loads a PHP file on demand, how do you implement it?
Chrome is called multi-threaded, so the difference between multithreading and multi-process is?
PHP at the end of 2011 hash collision, the principle of hash collision? How do I fix it?
What are the web security factors? How to guard against each other?
23. If two single-linked lists intersect, write an optimal algorithm to calculate the intersection location, say the idea is also possible?
24. What if you are the technical leader? How to improve team efficiency?
What are the Nginx load balancing? If one of the servers hangs up, how does the alarm mechanism be implemented?
26. If not optimized, what is the maximum number of Apache connections? Nginx General Maximum number of connections is? MySQL insert per second? Select? Update? Delete?
What are the MySQL data types? How much storage space do you use separately?
Nginx set Cache js, CSS, pictures and other information, the implementation of the principle of caching?
29. How do I increase the cache hit rate? How do I granular the cache?
What is the memory recovery mechanism for PHP?
31. All my questions have been asked, do you have any questions to ask me?


Five, debugging summary of my current common debugging methods:

Echo and Echo "<pre>";  Print_r (method); The script JS is the alert way. CSS debugging is to make the color blocks plus borders and so on
Log mode is used when printing is not possible. Logtofile ("My.Log", "Out page:". $_post [' cpage ']);
function Logtofile ($filename, $msg) {
$FD =fopen ($filename, "a");
$STR = "[". Date ("Y/m/d h:i:s", Mktime ()). "]". $msg;
Fwrite ($FD, $str. " \ n ");
Fclose ($FD);
There is a debugging Technology blog summary is quite comprehensive. See below.
Blog Address:
Online View:

PHP Debug Technical Manual release (1.0.0 PDF) Catalogue

1 built-in API output debugging
1.1 Basic Debugging API
1.1.1 Echo (print):
1.1.2 printf
1.1.3 Print_r, Var_dump (var_export), Debug_zval_dump
1.2 Error control and logging debugging
1.2.1 Error Option control
1.2.2 Error throwing and handling
1.2.3 using the error suppressor
1.2.4 Log Records
2 Browser debugging
2.1 Page Output debugging
2.2 firephp Commissioning
2.2.1 General variable Monitoring
2.2.2 Call stack Monitoring
2.2.3 monitoring throws an exception
2.2.4 Group Display Information
3 IDE Debugging
3.1 Basic Common IDE Introduction
3.1.1 Vim
3.1.2 Zend Studio
3.1.3 Eclipse
3.1.4 NetBeans
3.2 IDE Debugging
3.2.1 Zend Studio + Zend Debugger
3.2.2 Eclipse (PDT) + Xdebug
3.2.3 Vim + Xdebug + DBGP
4 PHP Performance Debugging technology
4.1 Basic time Occupancy monitoring
4.2 Using Xdebug for performance analysis
4.2.1 Installation configuration:
4.3 APD (Advanced PHP Debugger)
4.3.1 installation Configuration
4.3.2 using APD
4.4 Using Xhprof for performance analysis
Advantages of 4.4.1 Xhprof:
5 PHP Unit Testing Technology
5.1 PHPUnit

PHP Self-learning to advance the advanced route

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.