Table of Contents
回复内容:
Home Backend Development PHP Tutorial 如何有效的记忆PHP内置函数?

如何有效的记忆PHP内置函数?

Jun 06, 2016 pm 08:38 PM
php

PHP内置函数有上千个,该如何有效的记忆并且熟练运用呢?(这是我关心的)

因为在编程的过程中,去查手册,很不优雅而且打断思路。

我记得一篇文章里说,优秀程序跟普通程序的区别是:
普通程序员一直在处理低级问题,比如某类函数如何调用。

而优秀程序员,一般都靠不断重复的训练,不需要花费精力去处理这类问题,把精力专注于解决具体事情上面。

另外,比起边开刀边查手册的医生。我更加愿意相信,跟护士一边谈笑风生一边开刀的医生。

所以,我觉得我有必要记忆这些函数。

解释一下:
1.我说的记忆不是死记住,而是熟练的运用。
2.我把时间花在记忆上,不代表我不花时间在数据结构、算法等其他方面。

回复内容:

PHP内置函数有上千个,该如何有效的记忆并且熟练运用呢?(这是我关心的)

因为在编程的过程中,去查手册,很不优雅而且打断思路。

我记得一篇文章里说,优秀程序跟普通程序的区别是:
普通程序员一直在处理低级问题,比如某类函数如何调用。

而优秀程序员,一般都靠不断重复的训练,不需要花费精力去处理这类问题,把精力专注于解决具体事情上面。

另外,比起边开刀边查手册的医生。我更加愿意相信,跟护士一边谈笑风生一边开刀的医生。

所以,我觉得我有必要记忆这些函数。

解释一下:
1.我说的记忆不是死记住,而是熟练的运用。
2.我把时间花在记忆上,不代表我不花时间在数据结构、算法等其他方面。

常见的数组处理20个左右,类型判断/转换,字符串,日期各5~10个左右差不多够了,50个左右的函数足以覆盖7成需求,100个估计能覆盖9成

更重要的是多用,查手册查完以后要有个印象,查strlen的用法不要紧,查完记住就好,date的格式不用全记,常见的YmdHis记得就好。 优秀程序员不是不查手册,而是同一页手册不重复查

一款好的ide,比如PHPstorm写项目的话,实际上并不需要你记住函数的准确名字。我记住很多的函数只是一个大概,要我全部拼写出来可能很难吧,但是你让我对一个字符串做正在匹配,我可以很快想到 preg..,然后输入IDE会自动列出一些函数,这时候我就能确定是哪一个了。
关于记住每一个函数的参数,我想这个也没有太大的必要,只要大概记得它能做的事情就行了,因为IDE可以辅助你做这些事情。

  1. 不需要

  2. 知道一堆函數卻不會用纔不優雅呢

  3. 查手冊不低級,只知道查手冊纔低級

相關不蘊涵因果。普通程序員處理低級問題不是他們普通的原因。普通程序員只有能力處理低級問題纔是。

因爲判斷力,不是能學來的,只能訓練。學習只能學來普遍,學不來特殊,學不來建立特殊和普遍的聯繫的能力。

所以我覺得,沒必要記憶這些函數,能給你看,讓你有機會記憶的,只是冰山一角。

要不然,爲什麼不讓手冊去編程呢?


其實樓主已經回答了自己的問題,記住不是死記而是熟練運用。

如何有效地熟練運用 PHP 内置函数?

常用的沒問題

不常用的沒必要

在這一對「記憶」的定義之下,這個問題根本就不是問題。

其实别的编程语言也一样,比如C语言编windows程序用到的API有两千多个,你总不会都去记住这些函数吧?就算都记住了,要是我有天想学php,是把windows API函数忘掉再学php函数呢,还是既记住winsows API,又记住php函数?我想优秀程序员也做不到这点.我目前的想法是:能把目前的程序编完,实现好功能就行,也不需要碰到一个函数就牢牢记住,用多了自然就熟了.
BTW:半个月前我也想熟练运用windows API所有函数,后来我发现高估自己智商了

项目做多了,记得也熟练了。然后,在不明白的google,问大牛,就行了。

多用吧 其实没必要记住全部的 记住经常用的内置函数就已经不错了 很多内置函数在实际开发中用不到吧?

对着手册撸一遍,想不牛X都不行

1.划分类别,记住常用的函数,其他有时间就看看

2.对常用的函数,在不同场景,加以应用和思考,想忘掉也难

3.看手册,看手册,在应用,思考,总结

多实践吧。当初我碰CSS,那个苦,PHP,那个苦,JavaScript,那个苦。
为了一些目的,我去修改PHP,从此我的PHP之旅开始,遇到不会修改的就百度。
现在可以写一点东西了。
CSS当初我很怕的,现在也能写写东西。
多实践,你就会有真知。
PS:我脑子也很笨的,现在我正正规规按照流程去网上看教程(比如W3School)我都要拿一本笔记本的,以后查起来会快很多,脑中印象也深刻。
正则表达式我网上看教程看一遍就忘记,拿了一本笔记本记笔记效果好了很多。
希望你不要成为我这种人……
本人初二学生一名,多多指教!=-=

多做项目,多用就记住了。光死记硬背是不可取的,要实际运用。要不然还是算不会用

我也想全部都记住,后来发现用的语言多了完全做不到。这时候你需要一个Dash或者Zeal这样好用的文档浏览器,配合上快速启动工具,这样应该更适合。

常用的函数就那么几个,我认为只要记住有哪些内置函数就够了,需要的时候查一查。

常用的函数,用的多了自然就记住了,就像var_dump、json_encode

还有一些记住一部分名字,让IDE自动补全,就好了。

我刚学编程那会,天天在网上看到什么高手跟菜鸟的10个区别等文章。比如高手用记事本也能编程或者高手都是记事本编程的。现在发觉真的非常扯淡。

技术最终的目的就是做出产品。只要达到这个目的,啥法子都行,高手和菜鸟已经无所谓了。你做你的高手,我做我的产品,我的产品赚到钱了,你说我菜鸟我也没时间反驳你。

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1670
14
PHP Tutorial
1274
29
C# Tutorial
1256
24
PHP: A Key Language for Web Development PHP: A Key Language for Web Development Apr 13, 2025 am 12:08 AM

PHP is a scripting language widely used on the server side, especially suitable for web development. 1.PHP can embed HTML, process HTTP requests and responses, and supports a variety of databases. 2.PHP is used to generate dynamic web content, process form data, access databases, etc., with strong community support and open source resources. 3. PHP is an interpreted language, and the execution process includes lexical analysis, grammatical analysis, compilation and execution. 4.PHP can be combined with MySQL for advanced applications such as user registration systems. 5. When debugging PHP, you can use functions such as error_reporting() and var_dump(). 6. Optimize PHP code to use caching mechanisms, optimize database queries and use built-in functions. 7

PHP vs. Python: Understanding the Differences PHP vs. Python: Understanding the Differences Apr 11, 2025 am 12:15 AM

PHP and Python each have their own advantages, and the choice should be based on project requirements. 1.PHP is suitable for web development, with simple syntax and high execution efficiency. 2. Python is suitable for data science and machine learning, with concise syntax and rich libraries.

PHP and Python: Comparing Two Popular Programming Languages PHP and Python: Comparing Two Popular Programming Languages Apr 14, 2025 am 12:13 AM

PHP and Python each have their own advantages, and choose according to project requirements. 1.PHP is suitable for web development, especially for rapid development and maintenance of websites. 2. Python is suitable for data science, machine learning and artificial intelligence, with concise syntax and suitable for beginners.

PHP in Action: Real-World Examples and Applications PHP in Action: Real-World Examples and Applications Apr 14, 2025 am 12:19 AM

PHP is widely used in e-commerce, content management systems and API development. 1) E-commerce: used for shopping cart function and payment processing. 2) Content management system: used for dynamic content generation and user management. 3) API development: used for RESTful API development and API security. Through performance optimization and best practices, the efficiency and maintainability of PHP applications are improved.

The Enduring Relevance of PHP: Is It Still Alive? The Enduring Relevance of PHP: Is It Still Alive? Apr 14, 2025 am 12:12 AM

PHP is still dynamic and still occupies an important position in the field of modern programming. 1) PHP's simplicity and powerful community support make it widely used in web development; 2) Its flexibility and stability make it outstanding in handling web forms, database operations and file processing; 3) PHP is constantly evolving and optimizing, suitable for beginners and experienced developers.

PHP and Python: Different Paradigms Explained PHP and Python: Different Paradigms Explained Apr 18, 2025 am 12:26 AM

PHP is mainly procedural programming, but also supports object-oriented programming (OOP); Python supports a variety of paradigms, including OOP, functional and procedural programming. PHP is suitable for web development, and Python is suitable for a variety of applications such as data analysis and machine learning.

PHP vs. Other Languages: A Comparison PHP vs. Other Languages: A Comparison Apr 13, 2025 am 12:19 AM

PHP is suitable for web development, especially in rapid development and processing dynamic content, but is not good at data science and enterprise-level applications. Compared with Python, PHP has more advantages in web development, but is not as good as Python in the field of data science; compared with Java, PHP performs worse in enterprise-level applications, but is more flexible in web development; compared with JavaScript, PHP is more concise in back-end development, but is not as good as JavaScript in front-end development.

PHP and Python: Code Examples and Comparison PHP and Python: Code Examples and Comparison Apr 15, 2025 am 12:07 AM

PHP and Python have their own advantages and disadvantages, and the choice depends on project needs and personal preferences. 1.PHP is suitable for rapid development and maintenance of large-scale web applications. 2. Python dominates the field of data science and machine learning.

See all articles