You no longer need to be worried if you are taking the LinkedIn PHP Skill Quiz Assessment Exam and are unsure about the proper answer to the question “Which command will extract the domain suffix (“com”) from the string $string = “https://cat-bounce.com”;?”. I have provided the right answer to your question below.
Which command will extract the domain suffix (“com”) from the string $string = “https://cat-bounce.com”;?
Options
- substr($string, -3)
- $string.substr(-3)
- sub($string, -3)
- substr($string, 3)
The Correct Answer Is:
- substr($string, -3)
Conclusion
I believe I was successful in answering your query “Which command will extract the domain suffix (“com”) from the string $string = “https://cat-bounce.com”;?”. I hope you easily pass the certification exam and get the certificate as soon as possible. Have a great time! Good luck!