Warrior Forum - The #1 Digital Marketing Forum & Marketplace

Warrior Forum - The #1 Digital Marketing Forum & Marketplace (https://www.warriorforum.com/)
-   Programming (https://www.warriorforum.com/programming/)
-   -   which is best PHP or Java ? (https://www.warriorforum.com/programming/415751-best-php-java.html)

divontop 16th July 2011 05:52 AM

which is best PHP or Java ?
 
Friend can anyone tell me about these both language that which is best with allover performance ?

AdWorkMedia 16th July 2011 06:28 AM

Re: which is best PHP or Java ?
 
It would really depend on what purpose you are using the languages for. But if you are focusing on web development then hands down I would recommend PHP. Also if you are new to programming then you may find that PHP is easier to grasp and there are also more resources available online than Java.

Still, both are powerful languages with great performance.

Shilpa 16th July 2011 06:38 AM

Re: which is best PHP or Java ?
 
For me its PHP....

wedhooz 16th July 2011 06:47 AM

Re: which is best PHP or Java ?
 
you should read this article, maybe can give you another point of view between this never ending argument
PHP vs. Java – Which One Is the Better Web Language? | OnePixelAhead

phpguy 16th July 2011 07:42 AM

Re: which is best PHP or Java ?
 
Depends on what you are wanting to do there is a lot less learning curve with PHP, but all the concepts are the same.

Think of yourself as a carpenter you wouldnt use a screwdriver to hammer a nail you would use whatever tool it makes it easier to do get that nail in.

ngseosept 17th July 2011 11:35 PM

Re: which is best PHP or Java ?
 
It's PHP :)

Devskumar9 18th July 2011 06:15 AM

Re: which is best PHP or Java ?
 
Java language is hard compare the php for learning point then php is good for the learning and jobs point of java is good compare the php because In the java lot's of software develop and website develop. Java is good for the authentication program.

jacobsmith 18th July 2011 06:53 AM

Re: which is best PHP or Java ?
 
I think php is best in web development..
And also user friendly.

olakh 18th July 2011 07:09 AM

Re: which is best PHP or Java ?
 
PHP is best.Because it is easy to implement and understand.

ApocalypseXL 18th July 2011 08:38 AM

Re: which is best PHP or Java ?
 
There is no "Best" because they are different beasts . PHP is a server side script while JavaScript (aka LiveScript) is a client side script .

MrPolarZero 18th July 2011 12:47 PM

Re: which is best PHP or Java ?
 
Java for me. I find Java easier to learn than PHP.

MuttelKiln 19th July 2011 01:45 AM

Re: which is best PHP or Java ?
 
Java is best...i will vote for java.

cordyceps75 19th July 2011 05:16 AM

Re: which is best PHP or Java ?
 
PHP is for web based application. Java is for desktop application.

But Java can be convert to web based using JSP+servlet. I think the best is PHP for web based because PHP is commonly use by people around the world. Java is also good, but for the high level transactions, you must use Java for the server.

seamusb 19th July 2011 07:19 AM

Re: which is best PHP or Java ?
 
Quote:

Originally Posted by divontop (Post 4273479)
Friend can anyone tell me about these both language that which is best with allover performance ?

The answer to this question is - it depends.

PHP is great for web development and quick scripts. It has plenty of available open source code (including my beloved WordPress) and is easy to learn. For more advanced programming it supports object orientated frameworks such as CakePHP and CodeIgniter. It performs well and hosting is cheap and plentiful.

Java is a much more verbose language, is slower for development and the tools are generally more complex. The hosting is also more expensive. However, there are some frameworks and languages that use the JVM (Java virtual machine) such as Clojure and Scala that are very trendy at the moment with some developers.

I would say that if you are going for self employed type contracts for small businesses PHP is what I would learn. Java is for more corporate work. Both perform very well in their native environments :)

wayfarer 19th July 2011 08:08 AM

Re: which is best PHP or Java ?
 
If your question is really just about performance, then the answer is Java, which performs about 400 times faster than PHP in many cases. In a database driven website, the weakest link performance wise is the database itself, so the choice of programming language does not matter a bit when it comes to performance.

If you are performing operations that are computationally expensive, it would be foolish to use PHP, but for most normal cases, it is fine.

By computationally expensive, I mean, for example, a tree searching operation, which is the computation of a "tree" of unknown, or infinite size. Such operations will use 100% of your processor if you allow them to. An example of this would be searching an unindexed filesystem for specified values, or finding possible outcomes on a chess board. Java is good for this, even better would be a compiled language like C++ or C.

addison.agnote 22nd July 2011 04:42 AM

Re: which is best PHP or Java ?
 
Most Java developers think that PHP is very basic, unprofessional language that can be messy, lacks structure, doesn’t have a good IDE (integrated development environment) like Eclipse or RSA, and isn’t a good platform for a real website. On the Contrary PHP developers says that Java is overly complex and cumbersome, and that it isn’t a good platform because development time is just too slow and tedious.

stufftheme 22nd July 2011 01:38 PM

Re: which is best PHP or Java ?
 
java is best for company placement and working there
but for home designing php is the best

idreesfarooq 22nd July 2011 01:56 PM

Re: which is best PHP or Java ?
 
Offcourse, PHP as it is lot easier to understand than Java

Jake Gray 22nd July 2011 11:36 PM

Re: which is best PHP or Java ?
 
Java's main purpose isn't for web development.

On the other hand, PHP is.

williamjacob 23rd July 2011 12:57 AM

Re: which is best PHP or Java ?
 
There is no real absolute answer to your question unfortunately, because both languages have their pro's and cons.

I use both; php for smaller projects and java for more complex or "critical" projects, generally. It is easier/faster to code in php. It just seems a bit more "amateurish" than java, and doesn't allow for robust OO coding, tier separation, and other buzz words. (I'm sure some will argue otherwise)

One benefit of php is that it is (ironically) more portable than java, since it's an interpreted language and nearly all hosts support it. To support java, you need a JVM running and that adds extra complexity that many hosts don't want to bother with, unless you'vee got a dedicated package or some other setup that provides the JVM. Since php code is interpreted each time it loads it will never perform as well as java or allow you to catch errors at compile time (there is no compile time), although there are various optimizing and caching mechanisms to help with performance.

hhunt 23rd July 2011 01:24 AM

Re: which is best PHP or Java ?
 
There is no best language. Always choose the best tool for the job.

dennyrichs 27th July 2011 02:59 PM

Re: which is best PHP or Java ?
 
both are better.it depends on what are you trying to do.Php is being mostly used today because of its non procedural nature.it is useful for small websites and web applications.where Java is useful for large,complex applications and for mobile development.

Zenix 27th July 2011 03:16 PM

Re: which is best PHP or Java ?
 
Ofcourse this depends on what you shall do. PHP or Java, try them both and see which one you like.

Blacklisted 27th July 2011 03:42 PM

Re: which is best PHP or Java ?
 
I would suggest PHP

jasonthewebmaster 27th July 2011 03:45 PM

Re: which is best PHP or Java ?
 
This thread is totally pointless! You are trying to compare apples to oranges here.

SUPER Louie 27th July 2011 04:25 PM

Re: which is best PHP or Java ?
 
PHP is normally used for short term projects because the coding style is a bit crude and hard to maintain since you have to repeat codes over and over again.

Java can be used for bigger projects because you can use frameworks like Spring & Hibernate or Groovy & Grails to make code repetition lesser and to make it easier to maintain the project in case you need to revise it in the future (or if there are scope creeps)

try_hard_samurai 27th July 2011 05:18 PM

Re: which is best PHP or Java ?
 
Languages are simply tools that you can use to solve problems. As all things under the sun they each have their strengths and weaknesses. Java is an all purpose language that is massively popular in the corp world. You can make most anything with it.

PHP is a language built for the web.

So, if you're thinking about building desktop apps, then Java is the way to go. Internet stuff, PHP all the way. But really, it comes down to personal preference in the end.

pratap295 28th July 2011 11:34 PM

Re: which is best PHP or Java ?
 
There is relay no absolute answer to your question unfortunately, because both languages have their pro's and cons.

I use both; php for smaller projects and java for more complex or "critical" projects, generally. It is easier/faster to code in php. It just seems a bit more "amateurish" than java, and doesn't allow for robust OO coding, tier separation, and other buzz words. (I'm sure some will argue otherwise)

One benefit of php is that it is more portable than java, since it's an interpreted language and nearly all hosts support it. To support java, you need a JVM running and that adds extra complexity that many hosts don't want to bother with, unless you'vee got a dedicated package or some other setup that provides the JVM. Since php code is interpreted each time it loads it will never perform as well as java or allow you to catch errors at compile time, although there are various optimizing and caching mechanisms to help with performance.

butlermills 29th July 2011 06:01 AM

Re: which is best PHP or Java ?
 
PHP and java both are best programming language. According to me, Java is a better then PHP. Java is a very simple and easy programming language. really i like to use only the java.

muftdagyan 29th July 2011 06:09 AM

Re: which is best PHP or Java ?
 
If you are aiming to make software or web apps or combined web app that is a software then i think you should go for java,you can also do peer to peer programming in java.
If you simply want to make a website or a simple web app than go for php.
Php is easy to learn,and you can see great examples of web apps and websites made in php like facebook.
One more thing finding good shred hosting for java is difficult than finding good shared host for php.

harry142 30th July 2011 03:42 AM

Re: which is best PHP or Java ?
 
I think java is best.........

upendraets 30th July 2011 05:05 AM

Re: which is best PHP or Java ?
 
Java is best forever.

websilog 2nd August 2011 08:36 PM

Re: which is best PHP or Java ?
 
it depends on the purpose you'll be using it for. php rules for web dev.

BillBert 4th August 2011 02:32 PM

Re: which is best PHP or Java ?
 
3 years ago I would have said Java hands down. However PHP has really come a long way in closing the gap. Today, my first choice for server side development is PHP, no question!

tucan 4th August 2011 07:43 PM

Re: which is best PHP or Java ?
 
Between PHP and Java, I prefer PHP.

Between PHP and Perl, I prefer Perl.

anoopWebtech 5th August 2011 12:29 AM

Re: which is best PHP or Java ?
 
i think php is more better tha java

upendraets 5th August 2011 06:21 AM

Re: which is best PHP or Java ?
 
PHP is best

leppozdrav 5th August 2011 08:48 PM

Re: which is best PHP or Java ?
 
Java would definitely not be the language but yes JSP can be an option but still I would go with PHP as I know to an extent PHP but not JSP.Java and PHP have very different uses to achieve optimum efficiency and what one is good for the other may not be.

rajraju131 6th August 2011 12:30 AM

Re: which is best PHP or Java ?
 
PHP is the best and it is open source to study easily...

Codez 20th October 2011 02:45 AM

Re: which is best PHP or Java ?
 
Quote:

Originally Posted by williamjacob (Post 4320173)
There is no real absolute answer to your question unfortunately, because both languages have their pro's and cons.

I use both; php for smaller projects and java for more complex or "critical" projects, generally. It is easier/faster to code in php. It just seems a bit more "amateurish" than java, and doesn't allow for robust OO coding, tier separation, and other buzz words. (I'm sure some will argue otherwise)

One benefit of php is that it is (ironically) more portable than java, since it's an interpreted language and nearly all hosts support it. To support java, you need a JVM running and that adds extra complexity that many hosts don't want to bother with, unless you'vee got a dedicated package or some other setup that provides the JVM. Since php code is interpreted each time it loads it will never perform as well as java or allow you to catch errors at compile time (there is no compile time), although there are various optimizing and caching mechanisms to help with performance.

Actually You can build robust OOP with PHP if you know how. It's not hard at all just takes more time imho.

andy25i 20th October 2011 04:25 AM

Re: which is best PHP or Java ?
 
PHP and Java both have there own features for which they are know. Comparing them is of no use but if you are new to the programing and designing world prefer php as it is a bit less complicated compared to JAVA.

ranji01 20th October 2011 04:34 AM

Re: which is best PHP or Java ?
 
i think php is the best

SebastianJ 20th October 2011 09:04 AM

Re: which is best PHP or Java ?
 
Ruby on Rails. 'Nuff said.

deepsand 20th October 2011 09:12 AM

Re: which is best PHP or Java ?
 
Comparing PHP and Java is almost like comparing apples and oranges. You can have php programming with Java script on your website. It all depends on what you want to do, but the programs are different.

freehugs 20th October 2011 02:27 PM

Re: which is best PHP or Java ?
 
Quote:

Originally Posted by deepsand (Post 4905741)
Comparing PHP and Java is almost like comparing apples and oranges. You can have php programming with Java script on your website. It all depends on what you want to do, but the programs are different.

Comparing Java to Javascript is like comparing apples to butternut squash. Java is a byte-compiled statically typed language with C-like syntax and OO features. Javascript is generally only used for client side scripting in web browsers and is a duck-typed, dynamic, prototypal scripting language.

DavidWincent 20th October 2011 10:47 PM

Re: which is best PHP or Java ?
 
The purpose of both the languages is different. Java provides better authentication. Java language is tough to learn than PHP. PHP is quiet simple and easy to understand.

wndrshare 21st October 2011 03:02 AM

Re: which is best PHP or Java ?
 
I am a java programmer mainly, but I’ve been looking at a lot of posts of java vs php, and all of them say that java is more for the enterprise than php, but give NO reasoning for this.

SEO Inspection 21st October 2011 03:36 AM

Re: which is best PHP or Java ?
 
I vote for Python - but learn both.
Since PHP is very straight forward and the learning curve is a little steep for Java, you may get frustrated and stop working with Java. Then as you learn more about programming and PHP, you'll pick up the java book again and have a better chance at learning it. Good Luck

freehugs 21st October 2011 07:49 AM

Re: which is best PHP or Java ?
 
Quote:

Originally Posted by DavidWincent (Post 4909569)
The purpose of both the languages is different. Java provides better authentication. Java language is tough to learn than PHP. PHP is quiet simple and easy to understand.

Also, MongoDB is the secret ingredient in the webscale sauce.

jollyjenes 21st October 2011 11:01 AM

Re: which is best PHP or Java ?
 
The Java language is difficult to compare learning points, then PHP is the point of Java is a good study and work more PHP PHP, because a lot of software development in Java and Web development. Java is a good validation process.


All times are GMT -6. The time now is 11:17 AM.