Learning PHP is a good idea. PHP (a recursive acronym for PHP Hypertext Preprocessor) is a scripting language. It's the power behind some of the biggest websites on earth, including Facebook, Wikipedia, and Wordpress.
Learning PHP puts you in good stead as a programmer. You'll come across PHP all the time when working on websites, and it's a great way to add programming oomph to your HTML and CSS-based website. PHP enables you to script virtually anything.
Don't let the naysayers distract you. If you want to create code online, then you must spend time learning how PHP works.
How to set up and learn PHP in OS X: what is PHP?
PHP is a general-purpose scripting language. While HTML displays text and CSS styles it up, PHP is a programming language that can automate tasks. It's often used to get information from the user, or make API (Application Programming Interface) calls to other websites and online services. You can control program flow and logic gates in PHP, and use it as a programming language.
How to learn PHP: Setting up PHP in OS X
Mac OS X comes with PHP prepackaged. So there isn't much you need to do to install PHP. Open a Terminal window and enter php --version to check which version you have installed. If you're running OS X El Capitan, you will see PHP 5.5.31 (or later). Ours says "PHP 5.5.31 (cli) (built: Feb 20 2016 20:33:10)".
The latest stable release is PHP 7.0, which you can install via Homebrew using brew install php70. If you don't have Homebrew, then you can install it using the script at the Homebrew website.
However, we'd advise you to stick with PHP 5.5 in the short term. While PHP 7.0 adds a lot of cool new features, most tutorials use PHP 5.5, and it's still the version commonly used in most programming environments.
Sign up for CIO Asia eNewsletters.