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 Basic : 31 Exercises with Solution
- PHP arrays : 59 Exercises with Solution
- PHP for loop : 38 Exercises with Solution
- PHP functions : 6 Exercises with Solution
- PHP classes : 7 Exercises with Solution
- PHP Regular Expression : 7 Exercises with Solution
- PHP Date : 28 Exercises with Solution
- PHP String : 26 Exercises with Solution
- PHP Math : 12 Exercises with Solution
- PHP JSON : 4 Exercises with Solution
- PHP Searching and Sorting Algorithm : 17 Exercises with Solution
- More to Come !
- PHP Challenges: Part -1 [ 1- 25]
- More to come
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, Aug 2017 compared to a year ago
PYPL Popularity of Programming Language Index:
|1||Java||22.7 %||-0.7 %|
|2||Python||16.3 %||+3.7 %|
|3||PHP||8.9 %||-1.1 %|
|4||C#||8.3 %||-0.5 %|
|6||C++||6.6 %||-0.2 %|
|7||C||6.4 %||-0.7 %|
|8||R||3.6 %||+0.4 %|
|9||Objective-C||3.6 %||-1.2 %|
|10||Swift||2.8 %||-0.3 %|
|11||Matlab||2.3 %||-0.2 %|
|12||Ruby||1.8 %||-0.5 %|
|13||VBA||1.5 %||+0.0 %|
|14||Visual Basic||1.4 %||-0.3 %|
|15||TypeScript||1.3 %||+0.4 %|
|16||Scala||1.2 %||+0.1 %|
|17||Perl||0.8 %||-0.3 %|
|18||Go||0.6 %||+0.2 %|
|19||Kotlin||0.6 %||+0.5 %|
|20||lua||0.4 %||-0.1 %|
|21||Rust||0.3 %||+0.1 %|
|22||Haskell||0.3 %||+0.1 %|
|23||Delphi||0.3 %||-0.1 %|
Source : http://pypl.github.io/PYPL.html
Note: The PYPL Popularity of Programming Language Index is created by analyzing how often language tutorials are searched on Google.
TIOBE Index for August 2017:
|Aug 2017||Aug 2016||Change||Programming||Language||Ratings||Change|
Source : https://www.tiobe.com/tiobe-index/
Note: The ratings are based on the number of skilled engineers world-wide, courses and third party vendors. Popular search engines such as Google, Bing, Yahoo!, Wikipedia, Amazon, YouTube and Baidu are used to calculate the ratings.
List of Exercises with Solutions :
- HTML CSS Exercises, Practice, Solution
- jQuery Exercises, Practice, Solution
- jQuery-UI Exercises, Practice, Solution
- CoffeeScript Exercises, Practice, Solution
- Twitter Bootstrap Exercises, Practice, Solution
- C Programming Exercises, Practice, Solution
- C# Sharp Programming Exercises, Practice, Solution
- PHP Exercises, Practice, Solution
- Python Exercises, Practice, Solution
- Java Exercises, Practice, Solution
- SQL Exercises, Practice, Solution
- MySQL Exercises, Practice, Solution
- PostgreSQL Exercises, Practice, Solution
- SQLite Exercises, Practice, Solution
- MongoDB Exercises, Practice, Solution
- Euler Project
[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.]