PHP

Share:

These questions were shown only to the developers who chose PHP as one of their three primary programming languages.

Which versions of PHP do you regularly use?

202020212022
46%PHP 8.1
34%41%PHP 8.0
44%76%61%PHP 7.4
46%37%18%PHP 7.3
41%26%14%PHP 7.2
21%11%7%PHP 7.1
15%8%6%PHP 7.0
22%13%11%PHP 5.6
5%3%2%PHP 5.5 or older
1%2%I'm not sure
076%

The popularity of PHP 8.1, the latest version, is growing quickly, as it is already used by 46% of PHP developers. Despite the end of active support, PHP 7.4 still remains the most widely used version, at 61%.

Which PHP development environments do you regularly use?

71%

Local

50%

Containerized

39%

Remote

12%

Virtualized

1%

Other

Using local development environments remains the most popular among PHP developers. The majority of remote environment users also use local development environments.

How do you usually debug PHP code?

Which PHP frameworks and platforms do you regularly use?

58%

Laravel

24%

Symfony

21%

WordPress

9%

CodeIgniter

7%

Yii

5%

Slim

In 2021, there was a substantial increase in the number of PHP developers (specifically ones using Laravel) that we polled. Our personal survey sharing links were posted in some large PHP communities, and tweeted by many Laravel influencers. This resulted in a disproportionately high share of PHP and Laravel developers.

Laravel remains the most used framework in the PHP community. Half of PHP developers stick to using a single framework.

Do you use any libraries or frameworks for asynchronous PHP?

79%

I don’t use any

11%

Swoole

7%

ReactPHP

2%

Amp

2%

Other

It’s great to see some growth here. Async PHP development is still a niche field, but it likely always will be.

How do you run your PHP applications in production?

74%

Server, virtual machine

25%

Shared hosting

13%

Serverless

13%

Platform as a service

6%

I’m not sure

4%

Other

The majority of PHP developers run applications on servers or virtual machines.

With its share-nothing nature, PHP has always been ready for the serverless world.

It's nice to see Bref and Laravel Vapor growing with support for AWS Lambda. Seeing native support for PHP in the DigitalOcean Functions brings more competition into the market, which is always good.

Which composer repository do you use?

71%

Packagist

21%

I don't use composers at all

10%

Private Packagist

7%

Private Composer Satis

1%

JFrog Artifactory

3%

Other

Which editor or IDE do you use most for PHP development?

63%

PhpStorm

25%

VS Code

4%

IntelliJ IDEA Ultimate with the PHP plugin

3%

Sublime Text

1%

Vim

1%

Notepad++

1%

NetBeans

1%

Atom

1%

Other

Despite all the measures we’ve taken to secure a representative pool of respondents, these results may be slightly skewed towards users of JetBrains products, as they were more likely to take the survey.

Which testing frameworks do you regularly use?

55%

PHPUnit

6%

Pest

5%

Codeception

3%

Behat

2%

PHPSpec

1%

SimpleTest

1%

Infection

1%

Other

8%

I write tests but don’t use any frameworks

33%

I don’t write tests for PHP

What additional quality tools do you use regularly?

31%

PHP CS Fixer

28%

PHP_CodeSniffer

23%

PHPStan

14%

Php Inspections ​

8%

Psalm

6%

PHPMD

6%

PHP Insights

4%

Rector

2%

Phan

1%

Other

46%

None

Rector has made it onto the shortlist for the first time! This automatic refactoring and upgrade tool has gained a massive user base that continues to grow.

What template engines do you use?

41%

Blade

26%

Twig

9%

Smarty

3%

Mustache

1%

Latte

4%

Other

29%

None, I use pure PHP

8%

None, I don’t render HTML

What tools do you use for profiling or measuring performance?

21%

HTTP load testing

21%

Xdebug Profiler

17%

In code timers

12%

Application performance monitoring

6%

Blackfire.io

4%

XHProf

2%

Other

44%

None

How would you like for PHP to evolve?

Respondents could pick more than one option.

47%

Currently the balance is good

30%

I’d like new features but fewer BC breaks

27%

Add more new features; I don’t care about BC breaks

4%

Just eliminate BC breaks; I don’t care about the features

3%

Other

The survey shows that the community mostly (47%) agrees with the current speed of evolution, weighing the need for more features with the necessity of a stable language. This is further illustrated by the fact that respondents who expressed their view to want more new features, but fewer BC breaks (30%) nearly equals the group who wants more features, despite of BC breaks (27%).

Derick Rethans

Creator of Xdebug, and PHP foundation member

Thank you for your time!

We hope you found our report useful. Share this report with your friends and colleagues.

If you have any questions or suggestions, please contact us at surveys@jetbrains.com.