PHP 开发者实践
PHP 开发者实践
PHP Developer Prepares
坚持了 5 年的创业项目决定结束了(行业垂直搜索方向,理想很美好、现实很骨感),作为没混好的草根站长 & 没被风吹起来的小互联网公司技术合伙人,个人基本见证了这几年 PHP 环境的发展(当然主要归功于互联网创业风潮大爆发),感受了一些 PHP 团队和从业者的现状;同时,我们自身在 PHP 研发团队组建过程中也遇到了不少问题,一直想把创业过程中遇到的这些团队实践相关问题整理、总结一下,目前只是个初始版本,欢迎大家拍砖 & 加入!
技术的发展日新月异,我会持续维护、跟进这个项目,欢迎各位有兴趣的朋友 提交建议、问题 - Issue或 参与贡献、分享 - Pull Request。
- 本项目排版遵循 文案排版指北和 Stack Overflow Markdown规范
-
本项目使用了 GitBook 并已发布在 GitBook.com上,关于如何使用 Gitbook 编写、生成、发布一本在线图书,请移步 GitBook Documentation或 Gitbook 使用入门 - 中文
- GitBook.com 是一个很优秀的社区,上面有很多优秀作者自出版自己的著作,就好像 Leanpub
- Gitbook 是 GitBook.com 提供的一个开源的基于 Node.js 开发的配套工具 - Github 地址
- 开发过程中遇到的绝大多数问题实际上都可以通过搜索引擎找到,关于搜索引擎使用技巧,请参考 如何用好 Google 等搜索引擎?
-
开发过程中遇到问题在论坛、社区中提问是很常见的情况,如何让他人快速理解你的问题、同时自己如何在提问中学习成长,推荐阅读: How To Ask Questions The Smart Way, 提问的智慧 - 中文版或提问的智慧 - 图片版
「《提问的智慧》就是一个敲门砖,它把黑客间的礼仪和准则明白地写下来。它会让你了解到一个事实,为什么那些看起来很牛的人几乎从不提问,似乎他们一进入这个行业就是牛人了。不是的,他们也有问题,但是通常在提问之前就自己解决了;不是因为他们本来就懂得怎么解决,而是解决问题的经历让他们成为牛人;最终,你只会看到网络上多了一篇文章:关于解决XXX问题的方案。」-- Rei
-
因为关于如何使用 PHP 语言本身相关资料已有很多,本文将尽量不涉及 PHP 语言本身、且优先引用已有资料,主要围绕关心 PHP 项目开发技巧和具体实践,通过相关工具和经验的分享,使大家在项目中更好的使用 PHP 技术。
在线阅读
重要说明:正在持续修改之中,大部分章节都没有写完,正式发布还需要一段时间,所有内容随时可能发生变动。
- http://ryancao.gitbooks.io/php-developer-prepares/content/
如何参与
本项目在 Github 上维护,欢迎参与: https://github.com/zacao/php-developer-prepares。
- 在 GitHub 上把本项目 fork到自己的仓库,如
/php-developer-prepares,然后 clone到本地,并设置用户信息。 $ git clone git@github.com:<your-username>/php-developer-prepares.git$ cd php-developer-prepares$ git config user.name "yourname"$ git config user.email "your email"
Copy after login - 修改代码后提交,并推送到自己的仓库。
$ #do some change on the content$ git commit -am "Fix issue #1: change helo to hello"$ git push
Copy after login - 在 GitHub 网站上提交 pull request。
- 定期使用项目仓库内容更新自己仓库内容。
$ git remote add upstream https://github.com/zacao/php-developer-prepares$ git fetch upstream$ git checkout master$ git rebase upstream/master$ git push -f origin master
Copy after login
授权许可
本文采用创意共享 「署名-非商业性使用」许可证(Creative Commons Attribution-NonCommercial license)。所有内容不仅可以免费阅读,还可以自由使用(比如转载),只需遵守两个条件:
-
署名:必须保留原作者的署名。
-
非商业性使用:除非得到正式许可,否则不得用于商业目的。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

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

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Alipay PHP...

JWT is an open standard based on JSON, used to securely transmit information between parties, mainly for identity authentication and information exchange. 1. JWT consists of three parts: Header, Payload and Signature. 2. The working principle of JWT includes three steps: generating JWT, verifying JWT and parsing Payload. 3. When using JWT for authentication in PHP, JWT can be generated and verified, and user role and permission information can be included in advanced usage. 4. Common errors include signature verification failure, token expiration, and payload oversized. Debugging skills include using debugging tools and logging. 5. Performance optimization and best practices include using appropriate signature algorithms, setting validity periods reasonably,

Session hijacking can be achieved through the following steps: 1. Obtain the session ID, 2. Use the session ID, 3. Keep the session active. The methods to prevent session hijacking in PHP include: 1. Use the session_regenerate_id() function to regenerate the session ID, 2. Store session data through the database, 3. Ensure that all session data is transmitted through HTTPS.

The application of SOLID principle in PHP development includes: 1. Single responsibility principle (SRP): Each class is responsible for only one function. 2. Open and close principle (OCP): Changes are achieved through extension rather than modification. 3. Lisch's Substitution Principle (LSP): Subclasses can replace base classes without affecting program accuracy. 4. Interface isolation principle (ISP): Use fine-grained interfaces to avoid dependencies and unused methods. 5. Dependency inversion principle (DIP): High and low-level modules rely on abstraction and are implemented through dependency injection.

The enumeration function in PHP8.1 enhances the clarity and type safety of the code by defining named constants. 1) Enumerations can be integers, strings or objects, improving code readability and type safety. 2) Enumeration is based on class and supports object-oriented features such as traversal and reflection. 3) Enumeration can be used for comparison and assignment to ensure type safety. 4) Enumeration supports adding methods to implement complex logic. 5) Strict type checking and error handling can avoid common errors. 6) Enumeration reduces magic value and improves maintainability, but pay attention to performance optimization.

How to debug CLI mode in PHPStorm? When developing with PHPStorm, sometimes we need to debug PHP in command line interface (CLI) mode...

How to automatically set the permissions of unixsocket after the system restarts. Every time the system restarts, we need to execute the following command to modify the permissions of unixsocket: sudo...

Sending JSON data using PHP's cURL library In PHP development, it is often necessary to interact with external APIs. One of the common ways is to use cURL library to send POST�...
