write a php function to test whether a number is greater than 30, 20 or 10 using ternary operator in PHP


🤖 Code Explanation

The first thing this code does is define a test function that takes a single parameter. This function will return a string that says either "greater than 30", "greater than 20", or "greater than 10". If the number inputted is less than 10, it will return the string "Input a number at least greater than 10!".

Next, the code calls the test function with the input 40. Since 40 is greater than 30, the function will return the string "greater than 30".

Download SpellBox today