DZone
Web Dev Zone
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
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Web Dev Zone > PHP 5.4 features poll: the results

PHP 5.4 features poll: the results

Giorgio Sironi user avatar by
Giorgio Sironi
·
Aug. 02, 11 · Web Dev Zone · Interview
Like (0)
Save
Tweet
7.31K Views

Join the DZone community and get the full member experience.

Join For Free
After two weeks, we have closed the poll among the PHP community of Web Builder Zone to establish which are the most wanted features, which will influence development of applications on PHP 5.4. Hopefully this poll would also shape our focus in tutorials in the future - I personally plan to dedicate more time to the winning features.

The runners-up

Some innovations of PHP 5.4 have not stand the test of the crowd: deprecation of magic quotes and other strict mode changes did not receive many votes, as well as the closures new features like the binding of $this.

Even the built-in HTTP server, which is quite handy during development, did not manage to hit the podium.

3rd place: upload progress patch (11%)

The upload progress feature is not cited in many places as groundbreaking, as it was always available as a patch for 5.3. However, recompiling PHP has the same issues than changing from 5.3 to 5.4: now the patch will also be available on shared hosting and in other hosting services which do not provide the control over the PHP binary you can use.

Evidently, with a larger and larger usage of the cloud, upload of large files needs monitoring and, as an example, I cannot think of a Gmail without uploading progress. With the upload progress patch in the core and some optional support from frameworks, this would become a commodity in the PHP world.

2nd place: traits (29%)

Traits for horizontal code reuse are the mostly marketed feature of PHP 5.4, but they didn't get the first prize.

However, many people like me are probably unsure about how to use traits effectively, a dimension of design which we need to explore further. It's easy to make a mess with a powerful language in our hands - so before start cranking out traits instead of classes we should take a look at which problems they are going to solve and which are more suitable to other approaches, like composition and abstract classes.

1st place: arrays improvements (37%)

Arrays are the superglue of PHP: they work as collections, list, sets, maps, and more. We quotidianely wrap them to provide more complex classes and in the basic form they are supported by a large set of native functions for whatever purpose, from search to ordering and other manipulations.

Dereferencing was the feature introduced first, but the new notation is probably the motive behind the popularity of this choice in the poll. I listened to JavaScript guys complaining about lack of native JSON support for months - what we get is not a JSON parser, but a notation which is as powerful and concise, and is consistent with the PHP look&feel.

Some other comments we got

PHP has an increasing duck typing versus defined interfaces conflict: both kinds of styles are supported. Are traits oriented to duck typing? For now yes, as objects traits are not distinguishable if not for the presence or absence of methods: instanceof works only with classes.

Of course there is a bit of surprise for traits not being the most wanted feature. Or maybe I have spoiled the audience in not expecting addition to the OOP model to be more revolutionary than practising of a OO design book? Yet mixins, a similar concept, is diffused in many other circles, even in Smalltalk, the original OO language.

These are the full results.

 

 

PHP

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Making Your Own Express Middleware
  • Purpose-Driven Microservice Design
  • Blocking Ads on Your Network Using Raspberry Pi 3 + Fedora + Pi-hole
  • Introduction to JWT (Also JWS, JWE, JWA, JWK)

Comments

Web Dev Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • 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
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo