DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
Building Scalable Real-Time Apps with AstraDB and Vaadin
Register Now

Trending

  • 8 Data Anonymization Techniques to Safeguard User PII Data
  • SRE vs. DevOps
  • How To Become a 10x Dev: An Essential Guide
  • What ChatGPT Needs Is Context
  1. DZone
  2. Coding
  3. Languages
  4. Modern PHP, Popularity, and Facebook

Modern PHP, Popularity, and Facebook

Matt Farina user avatar by
Matt Farina
·
May. 01, 14 · Interview
Like (0)
Save
Tweet
Share
8.70K Views

Join the DZone community and get the full member experience.

Join For Free

PHP is an incredibly popular programming language. For server side languages used on the web, PHP is the most popular language and the popularity is growing. Over the past decade PHP has added new language features, such as closures, and healthy programming practices have become far more common. Despite this, PHP has a bad rap.

Recently, Facebook has announced hack and the latest round of HHVM updates. Somewhere in the mix of Facebook announcements, far too many people are referring to Facebook as the place that's bringing about innovation and refreshing changes to PHP. I've heard this repeatedly and it can been seen in blog posts, like the latest one from Heroku announcing HHVM support.

While I find hack interesting and I'm glad to see more PHP execution environments, I see that a lot of the innovation that's happened in PHP is being overshadowed or missed. Just recently, I was asked why somone would want to use PHP. Aside from executing faster in a VM they had no idea what was going on. So, let's look at some of what you'll find in modern PHP. All of which have happened separately from any one large marketing entity.

Package Management

A problem that needs to be solved in any language is the use of dependent packages. How do you manage using dependencies, include them easily, finding them, and dealing with versions? This is where composer and packagist come in.

Package/Library Interoperability

Packages used to be stand alone or tied to a framework. The same piece of functionality would be re-written numerous times to work with different systems. Things are changing in PHP.

In addition to the new way of doing package management, which enables packages to be shared between frameworks, there is the PHP Framework Interop Group (FIG). They are working to define interfaces and conventions for some very common things. When common things are done in a common manner it makes re-using code far easier.

Language Features

PHP has a lot of modern language features. PHP had closures before Java. Namespaces have been around long enough that there is no supported version of PHP without them. It has modern language conventions and they are used.

Software Engineering and Programming Practices

Patterns, modern conventions, and a style that a programmer could appreciate are present in modern PHP applications. I can be just at home programming in Python as PHP. There are different language semantics and each has some strengths. But, it's not because PHP is hacky and Python (or some other language) is more elegant.

If you want to look around some of these modern projects take a look at Symfony, Guzzle, Assetic, or one of the other modern packages.

But, butt, but...

The worst software design I've seen was in a C application. I've seen some pretty wretched PHP and Python, too. There is a difference between what some people write and what's held up as how you can write or design code.

I'm not suggesting everyone jump on PHP. Or that Facebook doesn't deserve some credit. Or even that there isn't a lot of poorly written PHP.

I'm simply suggesting the PHP isn't a hack that's is or should die off. That someone can be a real programmer and perfectly happy writing in modern PHP.

PHP facebook

Published at DZone with permission of Matt Farina, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Trending

  • 8 Data Anonymization Techniques to Safeguard User PII Data
  • SRE vs. DevOps
  • How To Become a 10x Dev: An Essential Guide
  • What ChatGPT Needs Is Context

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com

Let's be friends: