Home php教程 php手册 是什么让我的PHP退役了

是什么让我的PHP退役了

Jun 13, 2016 am 11:13 AM
php personal and what is future Activity of programming project

对于我的个人业余项目和未来的编程创收活动,PHP作为我的一种编程语言的选择,已经从此退役了。作出这个决定并不容易,但是对于我热爱的编程事业的延续,这是必要的。你知道,我可不是仅仅因为热爱编程才做程序员,因为我不会干其它的。

历史

一切都开始于1999年,我8年级。互联网真正开始显示出魅力,我想编程。学习了基本的HTML,我可以做出网页,但我想让这些网页有更多的交互功能。Perl成为了选择,嵌入Apache里作为CGI。Perl最初不是做这个的,对于一个对Unix,Linux,Apache和HTTP是如何工作的一无所知的孩子,我不可能配置它们、让它们跑起来。

最终我找了一个web主机,上面所有的东西都已经配置好了,我就这样可以神奇的使用了。算是吧。我花了数月琢磨Perl,但这个东西实在让人困惑。有谁还记得那些正则表达式和大堆的代码来解析请求变量、获得一个$POST 和 $GET 数组?对我来说绝对是天书,我拷贝粘贴,假装知道自己在干什么。有谁还记得恐怖的Matt’s Script Archive这个脚本吗?

<ol class="dp-c">
<li class="alt"><span><span># From Matt's Script Archive  </span></span></li>
<li>
<span class="keyword">if</span><span> (</span><span class="vars">$ENV</span><span>{</span><span class="string">'REQUEST_METHOD'</span><span>} eq </span><span class="string">'GET'</span><span>) {  </span>
</li>
<li class="alt">
<span>@pairs = split(/&/, </span><span class="vars">$ENV</span><span>{</span><span class="string">'QUERY_STRING'</span><span>});  </span>
</li>
<li>
<span>} elsif (</span><span class="vars">$ENV</span><span>{</span><span class="string">'REQUEST_METHOD'</span><span>} eq </span><span class="string">'POST'</span><span>) {  </span>
</li>
<li class="alt">
<span>read(STDIN, </span><span class="vars">$buffer</span><span>, </span><span class="vars">$ENV</span><span>{</span><span class="string">'CONTENT_LENGTH'</span><span>});  </span>
</li>
<li>
<span>@pairs = split(/&/, </span><span class="vars">$buffer</span><span>);  </span>
</li>
<li class="alt"><span>}  </span></li>
<li>
<span class="keyword">foreach</span><span> </span><span class="vars">$pair</span><span> (@pairs) {  </span>
</li>
<li class="alt">
<span>local(</span><span class="vars">$name</span><span>, </span><span class="vars">$value</span><span>) = split(/=/, </span><span class="vars">$pair</span><span>);  </span>
</li>
<li>
<span class="vars">$name</span><span> =~ tr/+/ /;  </span>
</li>
<li class="alt">
<span class="vars">$name</span><span> =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack(</span><span class="string">"C"</span><span>, hex(</span><span class="vars">$1</span><span>))/eg;  </span>
</li>
<li>
<span class="vars">$name</span><span> =~ tr/</span><span class="comment">//d; </span><span> </span>
</li>
<li class="alt">
<span class="vars">$value</span><span> =~ tr/+/ /;  </span>
</li>
<li>
<span class="vars">$value</span><span> =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack(</span><span class="string">"C"</span><span>, hex(</span><span class="vars">$1</span><span>))/eg;  </span>
</li>
<li class="alt">
<span class="vars">$value</span><span> =~ tr/</span><span class="comment">//d; </span><span> </span>
</li>
<li>
<span># Build a hash with </span><span class="vars">$name</span><span> </span><span class="keyword">and</span><span> </span><span class="vars">$value</span><span> </span>
</li>
<li class="alt"><span>}  </span></li>
<li><span> </span></li>
</ol>
Copy after login

数月后,我风闻有一种语言叫PHP。你只需要向服务器上传一个.PHP文件,一切都搞定了。你直接能访问表单域里的变量,它们可以跟在URL后面提交。不须用正则表达式分析环境变量。相当的迷人。

498)this.width=498;' onmousewheel = 'javascript:return big(this)' alt="php logo" src="http://www.bkjia.com/uploadfile/2013/0904/20130904095327774.jpg" width="300" height="158" />

不仅访问GET 和 POST 变量是如此的容易,连接数据库也是要命的简单。所有的都是在Windows上?!愿望很快就成了现实。有人不久写出了WAMP的安装包——因为安装Apache和MySQL仍然不是一个很轻松的事。感觉就像是在天堂里了。最终,我开始编写能把数据存入数据库,取出数据,并操作它们的web应用了。

当然,现在知道的什么SQL注入攻击,XSS攻击,CSRF攻击,session注入攻击或其它的流行的安全漏洞问题,当时一无所知(公平的说,我肯定,当时整个行业都不太清楚这些东西)。

但我很快的就开始编程了,疯了似的。我开发论坛,我开发基础的网站生成器,日志和内容管理系统。我喜欢这些。总有一些新的东西要学,总有一些新的东西要做。爸爸的公司给了我很多便利,特别是他们的软件开发组。那是一个在休斯敦的小web开发公司,我有机会在里面和很多比我年长的程序员一起工作,之后我开始能独自承担大的网站开发。整个大学期间都在做这个,甚至开发了一个总共有16862行代码的PHP系统,提供给一个非盈利组织使用(在那时,我已经知道了常见的网站漏洞,并进行了修补)。

Rails和Django并没有吸引走我。我非常了解PHP,我有自己的框架,能够很快的让东西开发完成并跑起来。

就这样,我经历了MVC框架变革过程。作为一个PHP开发者,我的工作情况越来越好(更好的待遇,更好的职位),但慢慢的我发现,在我自己的业余时间里,写出的代码非常的好,可是在工作时间接触那些公司的代码却很糟糕。不是一般的糟。没法再糟了。做这些业余项目让我保持清醒,因为公司的那些程序在提醒我,让我痛苦不堪。

热情枯竭

这就是为什么PHP从我的业余项目和新的创收活动中退役的原因。我疲倦了PHP。热情耗尽了。我感觉对这种语言已经达到了最高水平,如果不转向新的语言,对这种语言我就没什么可做的了,我可不想落入这种状态。

我作为一个职业PHP开发人员挣了很多钱,我计划继续下去。但我的业余项目和个人业务创收上将会使用其它的语言和框架。

此外,PHP并不强调好的整洁的编码规范。有很多地方它实际是违背好的编码规范的。结果,你就看到了到处都是大堆的恐怖的PHP程序,跟这些程序打交道简直就是噩梦。新程序员可以通过阅读一些过时的速成教程很快学会这种语言,他们写出的很烂的代码,打包到产品里,这样的水平一年就能挣到6.5万美元。我亲眼看到过这种事情发生。PHP的易用和流行就像吸引苍蝇一样吸引了大量的初级开发人员。

初级的程序员会认为他们把代码格式化一下,加一些注释,他们的代码就整洁了。他们错了,他们格式化的恰恰是些烂代码。我在工作上整天遇到这样的代码。

我作为PHP热爱者的日子结束了。那么,下一步怎么办?

Scala

498)this.width=498;' onmousewheel = 'javascript:return big(this)' alt="scala-logo" src="http://www.bkjia.com/uploadfile/2013/0904/20130904095327438.png" width="310" height="88" />

php100推荐专题:

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

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
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)

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian Dec 24, 2024 pm 04:42 PM

PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

How To Set Up Visual Studio Code (VS Code) for PHP Development How To Set Up Visual Studio Code (VS Code) for PHP Development Dec 20, 2024 am 11:31 AM

Visual Studio Code, also known as VS Code, is a free source code editor — or integrated development environment (IDE) — available for all major operating systems. With a large collection of extensions for many programming languages, VS Code can be c

How do you parse and process HTML/XML in PHP? How do you parse and process HTML/XML in PHP? Feb 07, 2025 am 11:57 AM

This tutorial demonstrates how to efficiently process XML documents using PHP. XML (eXtensible Markup Language) is a versatile text-based markup language designed for both human readability and machine parsing. It's commonly used for data storage an

PHP Program to Count Vowels in a String PHP Program to Count Vowels in a String Feb 07, 2025 pm 12:12 PM

A string is a sequence of characters, including letters, numbers, and symbols. This tutorial will learn how to calculate the number of vowels in a given string in PHP using different methods. The vowels in English are a, e, i, o, u, and they can be uppercase or lowercase. What is a vowel? Vowels are alphabetic characters that represent a specific pronunciation. There are five vowels in English, including uppercase and lowercase: a, e, i, o, u Example 1 Input: String = "Tutorialspoint" Output: 6 explain The vowels in the string "Tutorialspoint" are u, o, i, a, o, i. There are 6 yuan in total

The Key to Coding: Unlocking the Power of Python for Beginners The Key to Coding: Unlocking the Power of Python for Beginners Oct 11, 2024 pm 12:17 PM

Python is an ideal programming introduction language for beginners through its ease of learning and powerful features. Its basics include: Variables: used to store data (numbers, strings, lists, etc.). Data type: Defines the type of data in the variable (integer, floating point, etc.). Operators: used for mathematical operations and comparisons. Control flow: Control the flow of code execution (conditional statements, loops).

Java Made Simple: A Beginner's Guide to Programming Power Java Made Simple: A Beginner's Guide to Programming Power Oct 11, 2024 pm 06:30 PM

Java Made Simple: A Beginner's Guide to Programming Power Introduction Java is a powerful programming language used in everything from mobile applications to enterprise-level systems. For beginners, Java's syntax is simple and easy to understand, making it an ideal choice for learning programming. Basic Syntax Java uses a class-based object-oriented programming paradigm. Classes are templates that organize related data and behavior together. Here is a simple Java class example: publicclassPerson{privateStringname;privateintage;

Create the Future: Java Programming for Absolute Beginners Create the Future: Java Programming for Absolute Beginners Oct 13, 2024 pm 01:32 PM

Java is a popular programming language that can be learned by both beginners and experienced developers. This tutorial starts with basic concepts and progresses through advanced topics. After installing the Java Development Kit, you can practice programming by creating a simple "Hello, World!" program. After you understand the code, use the command prompt to compile and run the program, and "Hello, World!" will be output on the console. Learning Java starts your programming journey, and as your mastery deepens, you can create more complex applications.

Problem-Solving with Python: Unlock Powerful Solutions as a Beginner Coder Problem-Solving with Python: Unlock Powerful Solutions as a Beginner Coder Oct 11, 2024 pm 08:58 PM

Pythonempowersbeginnersinproblem-solving.Itsuser-friendlysyntax,extensivelibrary,andfeaturessuchasvariables,conditionalstatements,andloopsenableefficientcodedevelopment.Frommanagingdatatocontrollingprogramflowandperformingrepetitivetasks,Pythonprovid

See all articles