laravel的开发环境配置是否有违php风格?
回复内容:
实在看不下去了,注册个帐号上来扯一下.说实话,文章有些地方说的还是很中肯的,php 确实出自草根,很多地方让人很不满意.但是,这篇文章里处处鼓吹 ruby,我看不出是何居心.我承认 rail 的理念确实很好,设计的也非常不错.但是这东西永远只是小众,效率问题,吞吐量问题都是短期内无法解决的.楼主自己去搜索一下多少初创公司使用 rail,然后当用户量上去的时候又不得不转型 java or php. 因为 rail 设计的好(我不承认 ruby 是个好语言,太tmd慢了,语法糖太多),所以大家从中学习,这有什么? RVM 的推广问题,其实 RVM 这东西被造出来就是很无奈的,ruby 还是太年轻了,很多语法在不同的变化,前后兼容很成问题,不得已才在本机安装多个不同版本的 ruby,我看不出这个有什么可以拿出来炫耀的.很好玩的是,楼主居然好意思拿包管理说事,你难道不知道 ruby 的包管理也是从 perl 学来的么?不要总是一副卫道士的样子,ruby 作者自己就承认从各种语言里学习不同的特性(请注意,这里的学习其实就是你说为的抄袭).再说说抄袭问题,ruby 中列表和字典这些元素也是从 perl 和 python 中全盘抄袭来的.
最后,你可以提出自己的观点,但是请不要误导别人,rail 现在以及在可预期的时间范围内都只是小众化的东西. 现在还是 php 和 java 的年代,当然我不反对学习新的语言和架构,然后扩展一下思路,甚至做一些东西,但请不要动不动就说某某某没前途,某某某该抛弃.存在即合理. 到底哪儿违背了倒是说说啊

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











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.

RESTAPI design principles include resource definition, URI design, HTTP method usage, status code usage, version control, and HATEOAS. 1. Resources should be represented by nouns and maintained at a hierarchy. 2. HTTP methods should conform to their semantics, such as GET is used to obtain resources. 3. The status code should be used correctly, such as 404 means that the resource does not exist. 4. Version control can be implemented through URI or header. 5. HATEOAS boots client operations through links in response.

In PHP, exception handling is achieved through the try, catch, finally, and throw keywords. 1) The try block surrounds the code that may throw exceptions; 2) The catch block handles exceptions; 3) Finally block ensures that the code is always executed; 4) throw is used to manually throw exceptions. These mechanisms help improve the robustness and maintainability of your code.

The main function of anonymous classes in PHP is to create one-time objects. 1. Anonymous classes allow classes without names to be directly defined in the code, which is suitable for temporary requirements. 2. They can inherit classes or implement interfaces to increase flexibility. 3. Pay attention to performance and code readability when using it, and avoid repeatedly defining the same anonymous classes.

In PHP, the difference between include, require, include_once, require_once is: 1) include generates a warning and continues to execute, 2) require generates a fatal error and stops execution, 3) include_once and require_once prevent repeated inclusions. The choice of these functions depends on the importance of the file and whether it is necessary to prevent duplicate inclusion. Rational use can improve the readability and maintainability of the code.

There are four main error types in PHP: 1.Notice: the slightest, will not interrupt the program, such as accessing undefined variables; 2. Warning: serious than Notice, will not terminate the program, such as containing no files; 3. FatalError: the most serious, will terminate the program, such as calling no function; 4. ParseError: syntax error, will prevent the program from being executed, such as forgetting to add the end tag.

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.
