search

为什么选择PHP

【注】本文另载在 http://www.16nn.com/?p=525 

今天有个写JAVA的同事问我,“PHP这么弱,你怎么会选择PHP呢,应该是java啊”。



是的,接触PHP这么久了,我都没问过我为什么会选择PHP,并在网上搜了下,“为什么选择PHP”,“为什么选择JAVA、C、C++”,又重新看了遍“PHP比你想象的好的多”,包括程序员的百科定义等等,作为一个web开发程序员,我想这就是我的答案:


1、最先迷恋上的是PHP而不是其它。


得从接触Linux开始谈起了,记得在接触Linux之前,从来就没有想过,除了windows还会有这么power的系统,是Linux的开源,Linux的命令行操作,还有shell脚本,让我喜欢上了Linux,而搭载在linux上的LAMP环境,让我第一次接触了PHP,写的第一个PHP代码不是“hello world”,而是phpinfo();PHP和Linux一样,开源。开源,是多么神奇的一件事情啊。还记得我写毕业论文那会,需要设计个网站原型,可我想自己写个能用的网站出来,这之前学过.net、java,但没拿来写过网站,那会正在实习,没有很多时间,听说PHP入门快,写网站也快,最后,仅用了一周的时间完成了毕设网站。后来从事系统运维工作,除了系统中跑的脚本为perl、python、shell外,接触到的所有网站平台、工具、开源系统等等,都是PHP开发的,从此就迷恋上了PHP。


2、选择PHP并成为一个真正的程序员。


做程序员的都知道,编程语言太多了,静态的、动态的,编译型的、非编译型的,还有脚本语言等等一大片。每门语言的出现和存在,都有它的道理,那我们到底选择哪个语言呢,我的感触是,像我们选择汉语为母语一样,你这是别无选择的,你必须先得会上一个语言,才有去学习其他语言的能力。


对于一个差不多的程序员,一般都会精通一到两门编程语言,顶多再熟悉一两门就很不错了。可事实上,编程语言只是一种工具,就好比我们的语言一样,不管是汉语、英语、法语等等,其实就一个目的,交流和沟通。同样,编程语言的目的,就是为了解决某个领域的特定问题和实现某个优秀算法等等。


对于一个真正的程序员,编程语言是其次,重中之重的是计算机软件最根本的东西。现在回过头来看,选择做一个程序员,尤其是做web开发的PHP程序员,一开始就直接选择PHP是不对的,应该从程序员最基础的开始,如计算机原理、操作系统、网络、数据结构、数据库、算法等等,语言最好是C。C就好比我们的母语一样。因为包括PHP在内的很多语言底层都是用C写的,包括强大的UNIX、Linux操作系统等。但是话说回来,对于一个要进入程序开发的新人来说,从学C、学计算机原理开始,是不现实的。所以选择一个语言,作为入门程序员的突破口,最好不过了。但是一个精通C的人,如果去学习PHP,甚至java等,都是小菜一碟。


【注】以上仅是个人见解,谢谢!
 1、如何成为一个正真的程序员 http://dandan390.blog.163.com/blog/static/342153952010343127566/
 2、PHP比想象的好得多 http://news.cnblogs.com/n/158147/
 3、什么是PHP高级工程师 http://www.phppan.com/2011/04/senior-php-programmer/
Statement
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
PHP Dependency Injection Container: A Quick StartPHP Dependency Injection Container: A Quick StartMay 13, 2025 am 12:11 AM

APHPDependencyInjectionContainerisatoolthatmanagesclassdependencies,enhancingcodemodularity,testability,andmaintainability.Itactsasacentralhubforcreatingandinjectingdependencies,thusreducingtightcouplingandeasingunittesting.

Dependency Injection vs. Service Locator in PHPDependency Injection vs. Service Locator in PHPMay 13, 2025 am 12:10 AM

Select DependencyInjection (DI) for large applications, ServiceLocator is suitable for small projects or prototypes. 1) DI improves the testability and modularity of the code through constructor injection. 2) ServiceLocator obtains services through center registration, which is convenient but may lead to an increase in code coupling.

PHP performance optimization strategies.PHP performance optimization strategies.May 13, 2025 am 12:06 AM

PHPapplicationscanbeoptimizedforspeedandefficiencyby:1)enablingopcacheinphp.ini,2)usingpreparedstatementswithPDOfordatabasequeries,3)replacingloopswitharray_filterandarray_mapfordataprocessing,4)configuringNginxasareverseproxy,5)implementingcachingwi

PHP Email Validation: Ensuring Emails Are Sent CorrectlyPHP Email Validation: Ensuring Emails Are Sent CorrectlyMay 13, 2025 am 12:06 AM

PHPemailvalidationinvolvesthreesteps:1)Formatvalidationusingregularexpressionstochecktheemailformat;2)DNSvalidationtoensurethedomainhasavalidMXrecord;3)SMTPvalidation,themostthoroughmethod,whichchecksifthemailboxexistsbyconnectingtotheSMTPserver.Impl

How to make PHP applications fasterHow to make PHP applications fasterMay 12, 2025 am 12:12 AM

TomakePHPapplicationsfaster,followthesesteps:1)UseOpcodeCachinglikeOPcachetostoreprecompiledscriptbytecode.2)MinimizeDatabaseQueriesbyusingquerycachingandefficientindexing.3)LeveragePHP7 Featuresforbettercodeefficiency.4)ImplementCachingStrategiessuc

PHP Performance Optimization Checklist: Improve Speed NowPHP Performance Optimization Checklist: Improve Speed NowMay 12, 2025 am 12:07 AM

ToimprovePHPapplicationspeed,followthesesteps:1)EnableopcodecachingwithAPCutoreducescriptexecutiontime.2)ImplementdatabasequerycachingusingPDOtominimizedatabasehits.3)UseHTTP/2tomultiplexrequestsandreduceconnectionoverhead.4)Limitsessionusagebyclosin

PHP Dependency Injection: Improve Code TestabilityPHP Dependency Injection: Improve Code TestabilityMay 12, 2025 am 12:03 AM

Dependency injection (DI) significantly improves the testability of PHP code by explicitly transitive dependencies. 1) DI decoupling classes and specific implementations make testing and maintenance more flexible. 2) Among the three types, the constructor injects explicit expression dependencies to keep the state consistent. 3) Use DI containers to manage complex dependencies to improve code quality and development efficiency.

PHP Performance Optimization: Database Query OptimizationPHP Performance Optimization: Database Query OptimizationMay 12, 2025 am 12:02 AM

DatabasequeryoptimizationinPHPinvolvesseveralstrategiestoenhanceperformance.1)Selectonlynecessarycolumnstoreducedatatransfer.2)Useindexingtospeedupdataretrieval.3)Implementquerycachingtostoreresultsoffrequentqueries.4)Utilizepreparedstatementsforeffi

See all articles

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

Hot Tools

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.