A client-side applet. Everything else (including standalone applications) can be written in PHP either using PHP-GTK, or using PHP compiler from Roadsend, or by extending .Net to support PHP.
There are, however, things that can be written in PHP, but not in Java, such as applications that do not require a Java virtual machine to run and applications compiled into native executable code...
2006-11-09 05:36:57
·
answer #1
·
answered by NC 7
·
0⤊
1⤋
You certainly can write a "standalone application" in php (or, you can't in java either - dpending on what exactly you mean by "standalone" - both require an interpreter to run).
True, you cannot write gui in "pure" php, you can't have it in java either - you end up using "native" libraries to create and manipulate the widgets. You could do the same with php... you can do even better by "plugging in" tcl in place of the "native calls".
And you can certainly access local files in php... Don't even know what he is talking about :-/
In general, you can write (almost) anything with any language. Everything you write matters only as a set of instructions to the CPU to perform certain operations. Different languages are just different ways to express those instructions. Some things are easier expressed in one language than in another, but the end result is the same.
As for the classes - they do have classes in php now, but even if they did not, class is hardly something you can or cannot write - it's just a tool for you to write something you really need - a functionality. Sure, if we start talking about syntactical constructs (like class) rather than functionality, there are tons of things you can't "write" in php. Runtime.getRuntime().gc() to name one. But does it matter?
2006-11-06 07:38:55
·
answer #2
·
answered by n0body 4
·
0⤊
0⤋
well, there are more then some.
to start with, you are comparing complete powerful language (java) with powerful scripting langauge (php). There is a big difference. Almost like apple, with pears (not orange though)
1) you can write complete stand alone application in java, but not in php. this completely end the comparasion because there many many things you can do when you can write standalone applciation .
2) games. 2D, 3D games can be written in java, but not php. (you can create some toy games in php, but come on!)
3) you can write to access and browse local files. php security issue, so can't.
there are many other things of these nature, but main differences are being able to write app in java, where php you can only do web pages. (in unix system, you can do little more then that but still very limited)
**note some says you can't do class/object in php. as of php version 5, it is completely object oriented. that is not the issue.
PS. I hate Java. My life completely spans around php. if you are into web, then don't worry about java's wings.
2006-11-06 07:23:43
·
answer #3
·
answered by aalamin79 2
·
0⤊
1⤋
A Class
///
2006-11-06 07:10:39
·
answer #4
·
answered by jan 7
·
0⤊
1⤋