[0:00] Python versus PHP, which is better? [0:02] Let's talk about it. Hey guys, John [0:03] Elder here from codemy.com and if you're [0:05] a brand new coder looking to get [0:06] started, which programming language [0:08] should you pick? Python or PHP? Let's [0:10] break it down to these six things. One, [0:12] how easy are they to learn? Two, how [0:14] easy are they to code? Three, what are [0:16] each good for? Four, how are their [0:17] communities and resources? Five, what's [0:19] the job outlook for each? And six, [0:21] what's my final recommendation? First, [0:23] how easy are they to learn? And the [0:25] answer is, pretty easy. If you have any [0:27] sort of coding background or if you [0:28] already know some other programming [0:29] language, you can easily pick up the [0:31] basics through, I'd say, intermediate [0:33] levels of both Python and PHP in an [0:35] afternoon. I've several intro courses [0:37] for both at codemy.com and I also wrote [0:39] a best-selling Python book and some PHP [0:40] books that could help. If you're brand [0:42] new to coding, you can still pick up [0:43] either in a few days to, I'd say, a week [0:45] with no problem at all. Python is [0:46] probably a little bit easier to learn, [0:48] but PHP is pretty simple, too. Next, how [0:50] easy are they to code? Python is [0:52] definitely the easier of the two to [0:53] code, but PHP is really not bad at all. [0:55] Python is known for its readability and [0:57] simplicity. Its syntax is clean and [0:59] resembles pseudo code, more natural [1:01] language-like, and it uses indentation [1:03] to make things easier to read. PHP, on [1:05] the other hand, can seem just slightly [1:06] more complicated. The syntax is a little [1:08] less readable because it uses lots of [1:10] weird characters, semicolons, and lots [1:12] of brackets and things like that. It's [1:13] just a little harder to look at and [1:15] easily comprehend. Not super hard, but [1:17] harder than Python. Third, what are each [1:19] good for? Python is a great general-use [1:21] programming language. It excels at data [1:23] science, machine learning, and AI [1:24] because of popular libraries like NumPy, [1:26] Pandas Matplotlib Scikit-learn and [1:28] PyTorch. We've got tons of videos on all [1:30] of those here on the channel. Python is [1:31] also great for back-end web development [1:33] because of popular frameworks such as [1:34] Django and Flask. It's also great for [1:36] graphical user interface apps, GUI apps, [1:39] using the Tkinter and PyQt libraries. [1:41] We've got tons of Tkinter, PyQt, Django, [1:43] and Flask courses here at codemy.com. [1:45] Python is also great at just [1:47] general-purpose coding. Have repetitive [1:49] tasks? Python is great at automating [1:50] them. PHP, on the other hand, is a great [1:53] server-side scripting language for web [1:54] pages. While it can be used on its own [1:56] or in a PHP framework such as Laravel, [1:58] Cake, or Symphony, the majority of its [2:01] use will be in powerhouse content [2:02] management systems such as WordPress, [2:04] Drupal, or Joomla. As of 2024, some [2:06] sources put the number of WordPress [2:08] websites on the entire internet at 43%. [2:11] Think about that. 43% of all websites [2:14] are made with WordPress, and PHP powers [2:16] WordPress. That gives it a ton of clout. [2:18] Though, outside of web development, [2:20] you'll be hard-pressed to find many uses [2:21] for PHP. You may have heard of the term [2:23] LAMP, which is a massively popular way [2:25] to deploy web apps. LAMP stands for [2:27] Linux machines, Apache web servers, [2:29] MySQL databases, and PHP. LAMP LAMP is [2:33] super popular because of its relative [2:34] ease of use, yet pretty high level of [2:36] functionality. And PHP is usually always [2:39] installed by default on most basic web [2:41] hosting packages. Fourth, community and [2:43] resources. Both Python and PHP have [2:45] extensive, massive, fanatic communities [2:47] with robust resources. If you have a [2:49] question or a problem with your code [2:51] along the way, you can always expect to [2:53] find dozens of answers instantly via [2:55] Google or Stack Overflow for each. [2:57] Learning resources for each are endless, [2:59] as well. There are tons of tutorials, [3:00] books, online courses, and bootcamps for [3:02] each of them. Five, what's the job [3:04] outlook for each? Both Python and PHP [3:06] are two of the most in-demand [3:07] programming languages in the world. [3:09] Neither are going away anytime soon. [3:11] Just head over to any job listing [3:12] website like indeed.com and search for [3:14] jobs in your area for each of them. [3:15] You'll likely find more diverse job [3:17] opportunities for Python simply because [3:19] Python does more stuff than PHP does. [3:21] But, if you're looking to focus solely [3:23] on web development, especially in a LAMP [3:25] or WordPress environment, PHP jobs are [3:27] plentiful and decent paying. Remember, [3:29] 43% of all websites on the entire [3:31] internet use WordPress, which uses PHP. [3:34] Salaries for each are competitive, and [3:35] it really just comes down to what sort [3:37] of work you're interested in doing. [3:38] Finally, which is better? Which do I [3:40] recommend? Well, to pick between these [3:42] two isn't really fair since Python is [3:43] used for so many more things than PHP is [3:45] used for. So, in that sense, Python is [3:47] clearly better. But, for what it does, [3:49] PHP is no slouch. A better comparison [3:52] might be PHP to JavaScript since they're [3:54] both primarily web page scripting [3:55] languages. If you're interested in that [3:57] comparison, check out the next video in [3:58] the playlist which should appear [3:59] somewhere up there. And as always, you [4:01] can learn all of these languages and [4:02] frameworks over at codemy.com where you [4:04] can get 50% off lifetime membership [4:06] today using coupon code YouTube50. My [4:08] name is John Elder from codemy.com and [4:10] I'll see you in the next video.