i just wanted to know for future which language is good php or java thanku..:)

Dani AI

Generated

For ’s question about which to learn, the thread has useful viewpoints from , , and others. Rather than a single “best” answer, turn the debate into a short, measurable experiment that yields a practical result for whatever future work is intended.

Do this four-week hands‑on trial:

  • Week 1 — set up both dev environments (PHP + Composer + a local server; Java JDK + IDE + Maven/Gradle). Time the setup and note surprises.
  • Week 2 — implement the same small feature set in each (simple CRUD with authentication and one file upload). Time‑box each task (e.g., 2–3 days) and record how long each feature took to reach a working state.
  • Week 3 — add tests and deploy a packaged build to a low‑cost host or container to compare packaging/deployment friction and start‑up characteristics.
  • Week 4 — run basic profiling or load checks, then list things that were faster, harder, or more enjoyable. Use these objective notes plus available job listings for the target role to decide.

Practical tips not yet covered in the thread: use Composer (PHP) or Maven/Gradle (Java) to manage dependencies; enable Xdebug (PHP) or a JVM debugger and profiler (Java) early; prefer prepared statements or an ORM for DB safety; use Git and containerization (Docker) so deployment differences are visible. Time-to-first-working-feature, testing support, deployment complexity, and personal enjoyment are more predictive than blanket opinions about “which is better.”

Bottom line: convert the discussion into data. The short experiment above turns subjective advice into concrete evidence for a career or hobby choice. Learning both later remains an option once one primary stack is established.

Recommended Answers

All 7 Replies

PHP and java both have bright future. But as per my personal opinion java will give you ample growth in future.

Learning them both would not hurt.

Member Avatar for Member #120589

Depends what you need to do. If you're interested in building straight-forward dynamic websites, then perhaps PHP would be the easiest. App building, e.g. Android-flavoured, may point you towards Java. Either way, it's deciding on the best tool for the job. I'm biased as I love php for its simplicity and it's almost code and go. My (limited) experience with Java, on the other hand left me very frsutrated. But that's just me. Java may help you to develop better OOP skills, as PHP is too flexible and allows all sorts of horrible procedural mongrelism.

@diafol makes good points here.

You have to remember that Java and PHP are completely different languages, so, it's really difficult to suggest which one will be better, because it hugely depends on the situations and the development projects. Let's assume that you were developing for the web, using a Java Applet for a web project might seem like a good choice, until you take a look at all of the security risks associated with this (hence why there are very little java applets online today!)

It seems kind of a weird question, are you sure that you didn't mean Javascript?

I couldn't agree with Diafol any more, +1. I love PHP, it's fun because it's challenging. It's useful because it works.

I too have very limited experience with Java and it's just a different world in comparison to PHP.

Ultimately it depends on what you'd like to do in the future, PHP and Java, imo, exist for very different reasons.

If you're considering your career then there seems to be a lot more work for certified Java experts who have built themselves a portfolio of their personal projects. Getting employed as a PHP programmer is difficult as it's quite a saturated market in comparison to its demand.

Java will be a catalyst to your Job profile in future because Android is having market and noramally all apllication games are based on java

Both have really bright futures according to their own advantages and features. PHP is most speedy and easy to use for web development. Java won't be going anywhere either.

Both are good choices for their respective domains.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.