Home > Backend Development > PHP Tutorial > How to improve PHP programming efficiency?

How to improve PHP programming efficiency?

WBOY
Release: 2016-10-18 08:55:59
Original
931 people have browsed it

I am new to PHP and writing code is very slow. It takes 2 hours to write a function (continuously modify it until it is optimized and perfected). After you finish writing, come back and look at the code you wrote. It should take you 10 minutes to write it.

This has always been the case, what should I do? Hope to impart experience

Reply content:

I am new to PHP and writing code is very slow. It takes 2 hours to write a function (continuously modify it until it is optimized and perfected). After you finish writing, come back and look at the code you wrote. It should take you 10 minutes to write it.

This has always been the case, what should I do? Hope to impart experience

  1. Write more code, write more code, write more code

  2. Read more php documentation (memorize a few more functions)

  3. Multiple summaries (records in blog form, etc.)

Let me recommend two books to you.

  1. "PHP and MySQL Web Development" There are many examples in it that you can write down by yourself, don't just read them.
    2. "In-depth PHP Object Orientation, Patterns and Practices" Don't rush to read many things in it. You can experience it while writing code. I have read it twice.

Of course, the efficiency cannot be improved too much while reading, but it won’t necessarily be the same after that→_→

I often write for hours and then delete or rewrite.

Your foundation may not be solid. If you want to develop quickly, you must first have a solid foundation. Then you can use frameworks for large projects. For small projects, you can try to accumulate some commonly used functions and classes. Over time, you will have solid skills and you will be fine.

I often bring it to work

Experience

So this is all based on experience, it’s okay, just write more.
Everyone will grow in the end. The only thing we can work hard for is the speed of growth.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template