CodeIgniter Forums
How easy PHP is - Printable Version

+- CodeIgniter Forums (
+-- Forum: General (
+--- Forum: Lounge (
+--- Thread: How easy PHP is (/showthread.php?tid=65827)

Pages: 1 2

RE: How easy PHP is - Call-Me-Captain - 07-31-2016

I started learning programming with Java (A long time ago), so I'm obviously more inclined to say 'Geez, Java is much better', but I think that every programming language has its pros and cons.

Most things were already said here, so I won't really add anything by writing this post, but I just felt like posting my opinion on this.
While it"s true that PHP is much... easier to write, and less strict than Java, I also believe that it is way easier to write really messy and horrendous code in PHP (I would know, since I am by no means a professional in any language - Just a hobbyist. And Java simply forces you to think a little bit more before writing something down. Which, I believe, is better than jumping right into the code. Same goes with C++: Before writing something, you need to think about what you are going to do at least a little bit more than with PHP. Of course, this is a weak argument, since any good developer would probably think before coding anyway, but still. To put it in other words: I believe, that, for beginners, PHP code may seem way easier than Java, but their code will also be way worse than if they had started learning with Java. Or something along the lines. You get my point.)

About what someone said about associative arrays: Yeah, I agree, those are friggin' awesome. Really easy to use, in comparison with Java/C++ Collections. But then again, probably less powerful when considering memory managment and all.

Aaanyway. My 10 cents. Because I didn't write enough for it to be considered 50 cents.

RE: How easy PHP is - albertleao - 07-31-2016

Hey Skunkbad,

Using something like Cordova for building an app is a great way to get a native application in the app store quickly. It also allows you to port your application to other platforms quite easily.

Using cordova will also allow you to learn a vast amount about html that most developers have no idea about until they started developing hybrid apps. When you start learning how to use CSS to leverage a phones GPU, monitoring page repaints, tracking memory usage, and many other things, you'll really grow as a developer.

If you do a good job, you can build a hybrid app with negligible performance difference between it and a native application.

RE: How easy PHP is - johnsmith - 09-16-2016

My first languages were C and some java. I dabble in Systems/Network Administration, too. I do not really find java to be any harder than PHP, probably because I used them in two different realms, systems programming on one hand and websites on the other.

RE: How easy PHP is - AmarInfotech - 09-21-2016

(07-28-2016, 10:44 PM)skunkbad Wrote: So this week I have officially been given the task to start making an Android app for the company I work for. If you've never done such a thing, Android seems like a strategy for Java programming. Holy moly, it's so different than PHP. I'm so glad I have a good grasp on PHP OOP, because it has really helped, but Java seems so much harder to get simple things done. 

For instance, in PHP we have file_get_contents(), which is usually a one liner for getting some sort of file contents, maybe even a URL. Try to do a simple HTTP GET request in Android/Java and you're talking about writing like 20 lines of code.

In PHP or HTML we can switch "pages" by simply linking up another file. In Android/Java this is a whole different concept, where you're just showing another "Activity" that you eventually quit to go back to the main "Activity".

Another thing that really takes some getting used to is that Java has checked and unchecked exceptions. In PHP exceptions are not something that you have to use, but can if you want to. In Java you can be forced to implement try-catch blocks. I can see how this is a good thing, but it's much more strict.

So the whole time I'm thinking how blessed we are to have PHP. It's just so so easy. I think I will always love it for being that way. I'm starting to like Java, but it sure is different. You can have classes inside classes in Java. It has no associative array like we are used to though, and that's a big bummer.

I also prefer to use PHP because it provideds more functionality and easy to use.