Becoming a PHP Professional【part 1】The Missing Link


Becoming a PHP Professional:

The Missing Link

When reading various PHP related blogs, Quora questions, Google+ communities, newsletters and magazines, I often notice extreme polarization of skill. Questions are either at the “How do I connect to a MySQL database?” level or something in the range of “How do I best scale my mailing system to send over one million emails per hour without introducing a new server?”

I personally distinguish between 4 distinct levels of PHP prowess (likely applicable to any language/profession):beginner,intermediate, professional and elite.

The extremes

In PHP, beginners learn about variables, includes, form processing. They learn simple logic constructs. They send an email with the help of a tutorial, maybe even touch on an object oriented programming example without actually understanding it. They work with Word Press and modify a couple CSS classes. With this knowledge, they apply for jobs and, unfortunately, usually fail.

Professionals are those who have given good parts of their lives to many projects. They’ve deployed commercial applications in most if not all frameworks, they’ve used different databases with PHP efficiently, they visited and/or talked at conferences. They studied design patterns and can easily engineer an entire project on their own from diagrams to execution. They left procedural code far behind.

Elite programmers are professionals who put in the fabled 10000+ hours into honing their skill. They supplement their PHP installations with extensions they wrote themselves, they find bugs just by glancing through source files, they are extremely meticulous about their code layout. They reject all but the most complex projects and find alternative and imaginative ways to solve problems people didn’t even know they had. They’ve written some well received books about the language, spoke at dozens of conferences, maybe even made their own branch of PHP or a highly successful framework or two.

So in all this, who are the intermediate ones?

The missing link

How does one get from beginner to pro and beyond? If one doesn’t know anything beyond the basics, how can they improve their skill enough to leave the bad practices behind and start practicing the more advanced approaches? This is a question I get asked a lot by beginners. In order to become a professional, one must first become intermediate.

What follows is a list of what one should go through on the path to PHP fluency.

Abandon spaghetti code

Many people think using classes means you’re writing object oriented code, while using functions means you’re writing procedural code. While this is false, for the sake of this argument, let’s assume the widespread vanilla definition: procedural code is code in which you simply don’t use classes and objects, and OOP code is code in which you use classes and objects as much as possible.

My advice is to fully abandon procedural code. Use object oriented coding style as much as possible – write classes, encapsulate logic, think with real world terminology. The performance benefit of procedural code over class based code is negligible when compared to the re-usability that proper OOP code gives you and future developers inheriting your project. A common argument against this is “But, Word Press is procedural!” To be frank, and this might sound harsh, “Word Press developers” are no more PHP developers than people with Instagram are photographers. Please don’t take this to mean WP is useless – it’s fantastic for blogs, simple websites and one-day projects you don’t want to spend too much time on. It’s excellent for making a quick buck or for people who aren’t too technical, but mastering WP will never make you a professional PHP developer – it’s a yarn of spaghetti code that can teach you no proper design principles.

Start small. Think of a real world concept, and try to represent it in OOP code. Work through some basic tutorialsand slowly go more advanced. Work on OOP code until you understand classes in general before transitioning to proper frameworks and confusing terms like “Model”, “View” and “Controller” – all these are foggy, abstract terms without having a solid foundation in OOP first.

Dissect existing projects

Dive into existing source code wherever you can find it. For example, look up PHP projects on Github, clone them, deploy them locally on your own machine and try to play around with the code. Go file by file, line by line, until you understand what each does.

Look for projects that are well commented and/or documented, well structured, and still alive. Projects last updated in 2008 won’t do you much good if you’re getting into PHP 5.5 – you’ll likely be missing out on the latest and greatest features that could make you stand out in an already overpopulated field.

Learn to set up your own PHP environment

Being able to set up your own environment is a priceless skill. Not only does it allow you to fine tune your setup, it also familiarizes you with building extensions from source.

Abandon Windows for development – if your main desktop is Windows, install virtualization software and run a Linux virtual machine – the case insensitivity of Windows, its line endings, and all other oddities inconsistent with most server environments out there are just asking for trouble, so it’s best to develop on a system that most resembles the environment you’ll eventually be launching on.

Virtual machines also help you experiment – if something goes wrong, you can just wipe it and start over or do a rollback. You can literally experiment as much as you want without fear of messing anything up. Mastering tools is important, but having a good workbench is too.

Experimenting with your own setups will also allow you to get familiar with the different servers out there – whether to use Apache of Nginx, whether to use neither of them and go with Appserver, and so on.

Exercise best practices early

When writing your own code, make sure you comment heavily with docblocks, indent beautifully and structure carefully. After you build a class, project or library, use well known documentation tools (PHPDocumentor,ApiGen) to extract the docblocks and improve on them.

A good IDE is worth its disk size in gold – getting used to one multi platform editor can help you be up and running in no time when setting up a fresh environment, so you can dive into code instantly without wasting time on setting up keyboard shortcuts and themes. Make sure you back up IDE configuration files on a cloud service like Google Drive, so you have them ready for import at all times even if you need to make a fresh installation. A good IDE isPHPStorm, or if you can’t afford it or have no open source projects with which to ask for a free license, Netbeansis a free alternative. Both are multi-platform.

Getting used to best practices early helps you remain consistent and lets other people read your code much more fluently. Find your style and stick to it – you’ll help both yourself and others. Try to follow the PSR standards (PSR-0, PSR-1, PSR-2, PSR-3) as closely as possible – they’re called standards for a reason. Most of us use and love them, and they make everyone’s code equally reusable and readable.

A good beginner friendly resource that gives up-to-date hints is PHP the right way – use it to get familiar with the latest best practices, basics of OOP, security, deployment, coding standards I mentioned above, and much more.

Try out different frameworks, choose one

For a long time, PHP was the language with most frameworks out there (JavaScript took over recently). Whether this speaks of the inconsistency of our community or the popularity of our language, I cannot say, but the fact remains that choosing a framework is a daunting task, especially when first starting out.

Having tried most of them, I can wholeheartedly recommend Phalcon as the go-to framework due to its robustness and quality, and the fact that it’s built in C and installed as a PHP extension (thus being faster than any current framework in existence). However, trying out different frameworks is an absolute necessity.

When you try them out, you learn about a new approach to a common problem every time. Each framework has its own quirks you’ll like and downsides you’ll hate but most importantly, you’ll learn about the mindset of others (particularly the developers of the framework). You’ll see new usages and approaches, and a very good exercise is re-building one of your sample projects in as many frameworks as you can find. This will help you efficiently gauge the efficacy of a particular framework: the speed of developing in it and its performance.


Don’t underestimate the hints and tips of others. Read as much as you can – if you keep at it, it doesn’t take as much time as you might think. Find good blogs to follow, read the tutorials on this website, traverse questions and answers on StackOverflow, visit the SitePoint Forums, subscribe to newsletters, follow good sources on Google+. Avoid basic PHP tutorial books – they’re outdated as soon as they’re published – instead, focus on individual snippets and tutorials of useful up-to-date code you can find all over the web. Even if the topic is something you’ve already covered, try giving it a read – you’ll often find that something new can be learned by reading someone else’s perspective on the very same thing.

If there’s no work, invent some

There is always something to do. Never catch yourself saying “I don’t have a project” or even worse, “I’m bored”. If you don’t have an active project to work on – make one up. Do you use a tool daily that frustrates you with its lack of functionality? Build a better alternative! Have no ideas for new products? Replicate existing ones – tryrebuilding a basic Facebook, recreate something you already know exists just for practice.

What’s most important is to never stop – there’s no amassing 10000 hours if you don’t put in the hours! Keep working, keep yourself interested and engaged. Make a simple address book app. Then rebuild it in another framework. Then rebuild it with another database (replace MariaDB with Mongo, for example). Keep busy!

Find a buddy/mentor

It’s easier to learn when you have someone to do it with. Find a buddy who shares your passion. Maybe you’re one of the lucky few with a partner who shares your geeky interests. Maybe you’re in school or university and have peers who would like to get started as well and need companionship in these adventures. You can even find a mentor and receive expert guidance.

Never underestimate the power of a companion – there’s a reason The Doctor always has one!


When you focus on all these entries with as much will as you can muster, when you realize it’s what you want and keep at it – you’re on the road to becoming a PHP pro. Maintain discipline, never give up (even if others around you do) and keep practicing.

If you’ve got any useful resources you’d like to share with us on how you bridged (or are currently bridging) the Intermediate gap, let us know in the comments below!




经过一个晚上的折腾,电脑又活过来了。这里再次特地感谢@国文,一枚专业的OS Killer :能搞坏系统不牛X,能把搞坏的系统重新复活才牛X。恩,有美女的电脑系统坏了可以找我这位室友,收不收费,学妹得看美的程度,学弟得看萌的程度。恩,是这样的。



1、电脑文件做好备份,最好把代码、文件、照片等等东西存在云上,百度云盘和金山快盘都是很好的选择,以下是两个盘的地址,用户名是 【】密码是【mqshare2014】一共大概有4个T,大家当然也可以自己申请一些空间啦:

















事情是这个样子的:前一天晚上看德国和美国队比赛,大概2点结束,德国1比0小胜美国但是克林斯曼和勒夫还是手牵着手一起出线了,然后看完就睡了啊。早晨9点起床,打开电脑,这个时候还是好的呢,然后上上网:水水空间,看看新闻,逛逛知乎;继而和室友一起去吃饭,吃完饭回来继续上上网,然后聊聊QQ之类的。2点多,关机,装好电脑,去蓝杰。嗯,噩梦就是这样开始了。到蓝杰以后,按开机键,出去倒杯水,打开Go语言写写博客,写到一半,屏幕一黑!恩,一黑!!黑!!!再按开机键,选windows系统,说没有正常关闭,得修复,或者依旧正常启动。点正常启动。机子卡了。一直卡着。20分钟没动!强制拔电池阿我就这么点手段阿!拔了电池,开机,还是选windows,还是原来那个,那点自动修复。恩,开始修复了。说会一个小时吧大概。没关系啊等着呗。然后15分钟过来以后,机子屏幕是黑的,按什么都不动了!恩,开机键。还是一样……拔电池……【我只会这个……】然后就是一如既往的卡顿。我觉得我的电脑是有了一些脾气了,我需要给他一点时间让他自己玩一会儿,恩应该是这样。(*^__^*) 嘻嘻……然后我过了一个小时回来以后竟然能够让我输入密码了!恩,那么这是不是就意味着可以使用了!卧槽不是啊,还是那个熟悉到圈圈一直转啊转的!我有强迫症阿我一直觉得!再等等先,于是又等了五分钟。于是还是不行。于是我又强制关机了。昨天本来是要写Go语言到基本语法以及那些很可爱到特性,却没想到机子一直不给力一直打不开。从下午3点到蓝杰到6点吃饭机子一直没启动,期间帮邵珂学姐讲解了一点Android还有给一个学弟讲了点SQL语句,还给他改了几个PHP的错误。吃完饭机子还是卡,卡就卡吧大不了今天我就不用了呗。没想到一语成幾【这个单词常常用于表现乌鸦嘴那种情况】,机子就是没启动起来。晚上0点回到宿舍,到0点30机子依旧没有启动。本来喝了点酒心情不是那么好,直接把机子一关上床睡觉了。第二天,就是今天,10点,开机,依旧开不开。我不是一个很有耐心的人,我虽然看起来和和气气到其实哥也有脾气的!

还有孩纸会问我为什么能写这篇文字,(*^__^*) 嘻嘻……哥哥双系统哦!(*^__^*) !





Technology is a tool.

It helps us accomplish amazing things, hopefully more quickly and more easily and more amazingly than if we hadn’t used the tool .

Before we had newfangled steam-powered hammering machines, we had hammers . And before we had hammers, we had the painful process of smacking a nail into a board with our bare hands.

Technology is all about making our lives better and easier. And less painful.
–––– Ryan Henson Creighton,<Unity 3D Game Development by Example>





JavaScript :















CodeIgniter (CI ):












今天晚上开会的最重要内容就是: 在暑假期间,所有C2P团队成员每天更新一篇技术博客


坚持两个月,每天进步一点点。 用户名:电话号码


例如我自己: 用户名:15200806084