Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialJoshua Lawson
4,953 PointsShould I start with PHP 7?
Ok, I'm at the beginner, soon to be intermediate stage of my PHP education. I'm seeing a lot of things already about mysql being deprecated and mysql is what is being taught in Team Treehouse. Instead of spending my time getting more familiar with mysql I figured I'd go straight to PDO. This may slow down the learning process a bit, but it seems silly for me to learn an outdated language knowing that I will have to switch in the near future. That's like saying I first need to learn Latin, then I can learn English.
So my question is, since the only true development I've done so far has been minor apps just for me, should I go ahead and jump right into PHP7? I realize the learning curve will be steeper initially but I figured I would just go all in and see how it goes. I'm having a hard time finding sources for beginners who stumble upon PHP7. Would you really recommend someone get familiar with PHP 5.x before making the leap?
Thanks for any replies.
1 Answer
Greg Kaleka
39,021 PointsHey Joshua,
I don't see any issue with learning PHP7 right off the bat. Most of what you might learn about php 5.x would apply regardless, though - most of the changes are just syntax. In other words, don't worry too much about which one a tutorial or lesson is in. You should know the differences, since there's lots of code out there in PHP 5, and if you try to completely ignore it, you'll have a rough time. Better to be able to translate where necessary.
As for MySQL vs PDO, this is a false dichotomy. You should absolutely learn MySQL (which is a very small, basic language to learn, actually - it's not really like its own programming language), as PDO is simply a wrapper around MySQL, and it's actually very beneficial to know what's happening under the hood (moreso than knowing Latin, which is much much harder, and probably a lot less useful heh). It's also often much quicker to type a quick select statement when testing your database than using PDO. You may also eventually find yourself wanting to query a database from a language other than PHP, in which case you'll be really lost if all you know is PDO. MySQL is much more versatile.
Hope that helps - and good luck in your learning! There's a lot to learn, and often learning the hard stuff that seems not so useful is more beneficial than you might think.
Cheers
-Greg
Joshua Lawson
4,953 PointsJoshua Lawson
4,953 PointsThanks so much! I appreciate the input.