Let us consider a code of checking the age first. It checks whether the ‘age’ is given in the form or not. If it’s not given, then it says ‘not mentioned’. When it’s given it just spits out the age. Very basic thing we normally did when php 7 had not come.
$age = isset($_GET['age']) ? $_GET['age'] : 'not mentioned';
As usual it’ll give an output of – ‘not mentioned.’ Now we write this code with the age given.