If you have some experience with any programming language, I’m sure you already know what operators and functions are.
And if you do not, don’t worry: they are very intuitive concepts and you’ll grasp them very quickly.
First, read the operators documentation to understand what operators are and how they work in PHP.
You don’t need to read all the chapters. Just focus on the most important operators, the ones you will use from the start:
It’s perfectly fine if you don’t remember everything (or even half of what you read). Your goal is to discover what you can do with PHP and understand its potential.
Then, move on to functions. Focus on the basics:
In DAY 2 you will also study strings.
Strings are extensively used in web programming and the PHP standard library includes many string-handling functions that you will use very often.
Now get back to your exercise from day 1 (you DID it, right…?)
You are going to add some additional functionalities using operators, custom function definitions and string-handling functions.
You can do whatever you want, just think of a nice functionality to include in your backend and try to implement it. It can also be something completely useless but funny.
If you need some inspiration, look at the following example: It reads a value from the request string (like an input value from an HTML form) and prints the even characters only.
This example uses some operators (increment, string concatenation, arithmetic) a couple of string functions and it also shows how to write a user-defined function: