w3resource
w3resource logo
Java Programming Exercises

PHP Exercises, Practice, Solution

What is PHP?

PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML.

The best way we learn anything is by practice and exercise questions. We have started this section for those (beginner to intermediate) who are familiar with PHP.

Hope, these exercises help you to improve your PHP coding skills. Currently, following sections are available, we are working hard to add more exercises. Happy Coding!

Note: It's fine if you are playing around with PHP codes with the help of an online PHP editor, to enjoy a full-fledged PHP environment (since online editors have several caveats, e.g. embedding PHP within HTML) up and running on your own machine is much better of an option to learn PHP. Please read our installing PHP on Windows and Linux if you are unfamiliar to PHP installation.

List of PHP Exercises :

PHP Challenges :

Note : You may accomplish the same task (solution of the exercises) in various ways, therefore the ways described here are not the only ways to do stuff. Rather, it would be great, if this helps you anyway to choose your own methods.

Popularity of Programming Language
Worldwide, Mar 2018 compared to a year ago:

Rank Change Language Share Trend
1 Java 22.62 % -0.8 %
2 Python 22.05 % +5.2 %
3 up arrow Javascript 8.56 % +0.2 %
4 down arrow PHP 8.22 % -1.8 %
5 down arrow C# 7.95 % -0.7 %
6 C 6.38 % -1.1 %
7 up arrow R 4.26 % +0.4 %
8 down arrow Objective-C 3.7 -1.0 %
9 Swift 2.92 % -0.6%
10 Matlab 2.31 % -0.4 %
11 Ruby 1.7 % -0.4 %
12 up arrow TypeScript 1.58 % +0.5 %
13 VBA 1.39% +0.0 %
14 down arrow Visual Basic 1.27 % -0.3 %
15 down arrow Scala 1.2 % -0.0 %
16 up arrow Kotlin 0.92 % +0.8 %
17 Go 0.84 % +0.3 %
18 down arrow Perl 0.78 % -0.1 %
19 down arrow lua 0.37 % -0.2 %
20 up arrow Rust 0.36 % +0.0 %
21 down arrow Haskell 0.31 % -0.0 %
22 down arrow Delphi 0.29% -0.1 %

Source : http://pypl.github.io/PYPL.html

TIOBE Index for April 2018

Apr 2018 Apr 2017 Change Programming Language Ratings Change
1 1 Java 15.777% +0.21%
2 2 C 13.589% +6.62%
3 3 C++ 7.218% +2.66%
4 5 up arrow Python 5.803% +2.35%
5 4 down arrow C# 5.265% +1.69%
6 7 up arrow Visual Basic .NET 4.947% +1.70%
7 6 down arrow PHP 4.218% +0.84%
8 8 JavaScript 3.492% +0.64%
9 - up arrow SQL 2.650% +2.65%
10 11 up arrow Ruby 2.018% -0.29%
11 9 down arrow Delphi/Object Pascal 1.961% -0.86%
12 15 up arrow R 1.806% -0.33%
13 16 up arrow Visual Basic 1.798% -0.26%
14 13 down arrow Assembly language 1.655% -0.51%
15 12 down arrow Swift 1.534% -0.75%
16 10 down arrow Perl 1.527% -0.89%
17 17 MATLAB 1.457% -0.59%
18 14 down arrow Objective-C 1.250% -0.91%
19 18 down arrow Go 1.180% -0.79%
20 20 PL/SQL 1.173% -0.45%

Source : https://www.tiobe.com/tiobe-index/

List of Exercises with Solutions :

[ Want to contribute to PHP exercises? Send your code (attached with a .zip file) to us at w3resource[at]yahoo[dot]com. Please avoid copyrighted materials.]

List of Exercises with Solutions :