answersLogoWhite

0

Is PHP compatible with Java

Updated: 8/9/2023
User Avatar

Wiki User

14y ago

Best Answer

I think both of them are very good and useful, but they are different of course, for example java is more secure and safe programming, but is also depended how Web Browsers support it, php is the programming which is relevant for all web servers.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

12y ago

If you are doing plain data transfer and processing between client-server-database then php is better. If you are making some complicated stuff like making widgets or web apps then obviously java beans is suited

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

PHP and Java are entirely different languages. (and JavaScript is a third language, not to be confused with Java.)

PHP is normally used on the web server, and it produces plain HTML or XHTML output (most of the time.) It's possible to use Java in the same way (using servlets or JSP.) If you are programming on the web server, it's best to pick one language and stay with it. It would be possible to combine both languages, but not advisable.

Java can also be used on the client as an applet. This is a separate program embedded into the web page (much like Flash applets) The applet and the server-side PHP are completely unrelated, so they can coexist without any problems. It's possible to make these elements communicate with each other, but there are much easier ways.

JavaScript is the language embedded into most web browsers. This language is perfect for client-side form-validation, and is the foundation of AJAX. It's extremely common for a web site to have aspects written in PHP (or Java, or ASP.NET) on the server and JavaScript on the client.

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

Don't really understand the question but if you are askin wheter Java is a good, if not the best, choice for programming then no.

Java has like all other programming languages its pros and cons.

Pros: easy, portable, very fast coding time, very good existing apis. Pretty easy to run it from the web with either webstart or applets.

Cons: interpreted on a virtual machine, making it relativly slow, some functionality that more hardcore programmers wish were exposed are not(like memory management and pointers/references/copies). No native instructions for graphics hardware, you mostly have to go through existing graphics API's, which to me at least feels pretty silly.

I actually find java pretty good for graphics development, nowdays with transform feedbacks and geometry shaders, you can do very many things related to graphics that traditionally was best done with programming languages with better performance(closer to the hardware). Though if you were to do something that required very much sorting on the cpu, like maybe a complex scenegraph or BSP, you would be better of with C++.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Is PHP compatible with Java
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What are Perl PHP and Java Servlet's?

Perl, php and Java are all examples of programming languages.


What is the difference between PHP and struts?

STRUTs is a framework of technology of java based on JSP/Java Servlets PHP is another server scripting language


The PHP syntax is similar to which languages?

Its similar to a number of languages such as C, C++, Java and Perl.


What is the difference between PHP and JSP?

They are different technologies - JSP stands for Java Server Pages, where PHP means PHP: Hypertext Preprocessor... Basically, they do the same thing - generate webpages, but JSP scripts are programmed in Java, and PHP scripts in PHP, which are completely different scripting languages. PHP is usually used in small to medium-sized projects, where Java tends to be percieved as a more "enterprisey" (aimed at large projects).


Which is best for a fresher Java or PHP?

PHP is very sufficient option for a fresher because its easy to learn.


How do you import others codes in java?

using servlets, php, and database we can connect import codes into java


How do you use settime out in php?

we cant use set timeout function in php because it is of java script function


How do you adjust php 5.3 code to make Wordpress Frugal website compatible with php 5.4?

Use PHP 5.4 version latest library .


Is COM and Java Applets supported by PHP?

Yes. See the references.


How can you embed a Java program in PHP webpage?

In the output stream (i.e. using echo), output an "embed" tag (or if using older HTML, the "applet" tag). Note that the Java will run on the client, not on the server, meaning that PHP variables, etc, will not be available to it.


What are the differences between PHP and Java Programming?

Java is primarily used to create desktop applications/software while PHP is used to make web applications/websites.Ofcourse both support website/web and desktop applications but you would find very few who interchange those two.Java is complex while PHP is a bit simpler.Java has a massive library while PHP has a small but quite useful library.Generally speaking JAVA developer earns more then PHP counterpart


Which has more jobs Java or PHP?

I suppose you will find more jobs if you are good with Java since many softwares are written in Java language whereas on the other side if you are inspired by internet then you should look forward to PHP which is a very sophisticated language for web world.