Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Evert Pot:
Strict typing in PHP 7 - poll results
Jan 15, 2016 @ 11:19:54

Evert Pot has shared the results of a poll he recently set up on Twitter asking PHP developers if they planned to make use of the strict typing functionality in PHP 7 in their applications. Unsurprisingly, the majority voted that they will with a more undecided audience coming in second.

Type hinting comes in two flavors: strict and non-strict. This is the result of a long battle between two camps, a strict and non-strict camp, which in the end was resolved by this compromise.

Now by default PHP acts in non-strict mode, and if you'd like to opt-in to strict-mode, you'll need to start every PHP file with this statement. [...] So I was curious about everyone and whether you will be using strict mode or not. Results are in.

According to those that voted 46% were completely in favor of using the declare statement to enable strict typing in their PHP 7 code by default. The next group, the "undecided" were at 26% with "no way" and "what is that?" coming in farther down the list. He also mentions a package that's in the works from Justin Martin that would automatically add the declare statement to your code in the desired location(s). Additionally there's an extension in development from Joe Watkins that will do the same thing but making it a bit more automatic.

tagged: php7 strict type declare poll results usage composer package extension

Link: https://evertpot.com/strict-types-pollresults/

Reddit.com:
How do you see the PHP-FIG?
Dec 14, 2015 @ 09:48:49

There's been a big discussion happening over on the PHP-FIG (Framework Interoperability Group) mailing list recently about the goals and vision for the project. While the group originally started out as a way to define standards for frameworks and projects to work together, some have begun to wonder if it's a bit more far reaching than that. This discussion/poll on Reddit sums up the question nicely:

There are some ongoing discussions on the PHP-FIG mailing list about, among other things, how the FIG is seen by the wider PHP community. [...] Since an earlier discussion pointed out that perhaps the FIG, while well-known, don't do enough "active outreach", consider this an attempt to "reach out."

Do you think:

  • The FIG is a bunch of self-aggrandizing elitist jerks who couldn't write a competent or useful "proposed standards recommendation" if their lives depended on it, and should disband entirely.
  • The FIG, while aware that the wider PHP community is watching, writes PSRs primarily for itself, and others can adopt or ignore as they wish;
  • The FIG has become the closest thing to a userland standards group that the PHP community has, and should accept that role;
  • Some other opinion?

There's already 50+ comments on the thread with several of the options being supported. There seems to be a leaning towards either the second option or the third with advantages and disadvantages for both. The group has undoubtably helped to change the way that modern PHP is written and they want to keep the tradition going and be what the community and language need. Go over an voice your own opinion on the matter too!

tagged: phpfig organization opinion poll standards community feedback interoperability

Link: https://www.reddit.com/r/PHP/comments/3wownq/how_do_you_see_the_phpfig/

Lorna Mitchell:
What Got You Involved in Open Source?
Jun 13, 2014 @ 12:16:04

Lorna Mitchell has shares some interesting results of a recent survey asking people how they got involved in working with open source projects. The results were from a poll announced on Twitter.

I did a very unscientific twtpoll recently regarding what brought each of us into open source. Plenty of people took the time to vote or retweet, so I thought I'd loop back around and let you know how it looked overall when the poll closed.

Not surprisingly, the largest group came from the "find a problem, submit a fix" category (40%) with the next in line being the group that open sourced their own code. The third category she mentions, coming in at 18% of the responses, was those seeking new skills either for personal growth or for their current (or next) job.

tagged: opensource involvement poll twitter results developer

Link: http://www.lornajane.net/posts/2014/what-got-you-involved-in-open-source

PHPMaster.com:
Create a Poll with PHPixie
Feb 05, 2013 @ 12:53:44

PHPMaster.com has a new tutorial posted showing you how to create a simple poll using the PHPixie PHP framework, a MySQL backend and a little bit of Javascript.

When choosing a PHP framework you need to make sure that it emphasizes features which are the most important to you. If you are looking for something fast, simple, and easy to learn than PHPixie may be a perfect choice. To illustrate the basics of developing with PHPixie we will create a small polling application. By the end of this tutorial you will have a working poll application and an understanding of how easy it is to code projects using PHPixie.

They provide you with all of the parts you'll need - the database table definition, the code for the modules/views/controllers and the Javascript to handle the addition of new options. You can find the full code on the PHPMaster github account.

tagged: poll phpixie framework mvc tutorial javascript

Link:

Developer Drive:
PHP User Survey: Setting Variable Values and Reading from Tables
Nov 30, 2011 @ 11:04:33

The Developer Drive blog has the latest post in their "PHP User Survey" series focusing on setting up admin functionality for the poll managers to use.

In Part I of this series, we started the process of creating user polls for a business web site. Part I gave the layout of the data layer and began the construction of the class file. In this part we will continue with adding methods to the class file that will enable the administrator to set the variable values and read from the database tables.

Code is included for setting the poll and answer ID values (setters), grabbing the number of polls currently defined, finding the active ones and pulling out poll data along with its answers. If you need to catch up, you can find the other parts here: part one, part two.

tagged: survey poll tutorial database table

Link:

Developer Drive:
Creating a PHP User Survey: Writing to Database Tables
Nov 22, 2011 @ 14:54:03

On Developer Drive today they've posted the most recent article in a tutorial series showing you how to create a user survey that stores the results to a database table. In this latest tutorial, they show how to hook the current code into a MySQL backend.

In the first two parts of this series, we created the data layer that will hold the polling data and established methods for setting the variable values and reading from the database tables. In this part, we will build the methods that will write new polls and answers to the tables.

They include the code for an "addPoll" method that inserts the questions and answers for the polls. Their "editPoll" method updates the poll questions/answers and the "addVote" method does exactly like it sounds - adding a vote to one of the poll options. Also included are "deletePoll", "activatePoll" and "deactivatePoll".

tagged: tutorial database table poll survey answers questions

Link:

Lorna Mitchell's Blog:
PHP Static Analysis Tool Usage
Aug 03, 2011 @ 10:50:22

In an informal poll Lorna Mitchell recently asked fellow developers to weigh in on what static analysis tool they used on their code. She's posted the results to her blog today with one of the tools being a clear winner.

My interest was mostly because I'm working on a book chapter which includes some static analysis content, and there are a couple of these tools that I include in my own builds, but I don't do much with the output of them. However I didn't want to drop anything from the chapter if it was actually a valuable tool and I was just missing the point - pretty much all the tools got a good number of votes though, so I'll be covering all of the [options].

According to her results, the most used tool by developers is the PHP_CodeSniffer with the PHP Mess Detector and PHP Copy & Paste Detector tied for second place.

tagged: poll results static analysis tool codesniffer phpmd phpcopypaste

Link:

DZone.com:
PHP 5.4 features poll: the results
Aug 03, 2011 @ 08:19:43

On DZone.com today Giorgio Sironi has posted the results of a poll taken a little while back concerning what people thought was the best feature of the upcoming PHP 5.4 release.

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.

Runners up included the removal of magic quotes and strict mode with the top three being (in this order) the upload progress patch, traits and the array improvements leading the pack. You can see the results here.

tagged: poll results traits upload progress array improvement

Link:

DZone.com:
The PHP frameworks poll results
Apr 01, 2011 @ 11:19:30

On DZone.com today the results of their framework poll have been posted with some not-so-surprising results base on popularity and number of users in general.

A disclaimer: creating this poll was a bit of a catch-22, as I could not include all PHP frameworks (would have been a very long list) and had to make a selection based on popularity; of course that meant a guess by using Twitter and google results, but the ultimate popularity of the framework, at least in the audience of Web Builder Zone, would only be established by a poll. I thank you for the participation and the suggestions: we had more than one thousand votes, and this means we gathered responses from a statistically valid sample of the PHP community.

According to the results, the Zend Framework comes in at first place with Symfony and CodeIgniter coming in just behind. CakePHP was in fourth and "Other" in fifth. He points out that the top three frameworks all have something in common - they're all company-backed, but still derive a large part of their contributions from the community.

tagged: framework poll results popularity zendframework symfony codeigniter

Link:

Web Builder Zone:
The PHP paradigms poll results: OOP wins
Oct 05, 2010 @ 11:21:17

According to this new post on the Web Builder Zone, the results of a poll taken about the best programming method for PHP these days is - by far - object-oriented programming.

After two weeks of gathering votes, the PHP paradigms poll is now closed. With 216 votes (73%), the winner paradigm in popularity is Object-Oriented Programming. The old procedural approach to PHP, which has given fame to Wordpress and Drupal, is coming to an end. Even Drupal 7 has an object-oriented database layer as a primary component, and this paradigm is by far the most diffused in the world for web sites and applications written in high level languages (different from C).

While the overwhelming amount of votes went to OOP, there were still a few for some of the other options including the second place winner - procedural programming. He also talks a bit about OOP's current place in the PHP ecosystem and how it has allowed for certain great tools to be developed, but how it also has a good ways to go in functionality.

tagged: poll paradigm results oop objectoriented procedural

Link: