Professional PHP

PHP Programming, Web Development, PHP Advocacy and PHP Best Practices.
« Upgraded to WordPress 1.5
PHP Application Security »

PHP first impressions from a J2EE programmer

February 19th, 2005

I ran across Cedric Otaku’s blog entry about his first impressions working with PHP as an experienced Java programmer. Not surprisingly, he chose PHP partly because it was already available on his ISP.

He highlights syntax, available libraries and string handling as PHP’s strengths.

He has some problems with the scoping rules and with the lack of namespaces.

Reading between the lines, I also wonder if he might prefer a stricter error_reporting setting.

Perhaps as a PHP advocacy issue it might be helpful to have a ‘PHP for Java programmers’ chapter of the PHP manual on php.net. I’m not sure how far something like this might go, but the seed seems to be there. A while ago, I started to compare the PHP response handling to Java’s HttpServletResponse. Request Handling is here.

A comment on this post is disturbing. It calls PHP ‘dangerous’ from a security perspective because of the recent phpBB vulnerability. To be fair, I have to admit that the /e modifier of preg_replace is obscure. (I’ve started compiling a list of Security Sensitive Functions in PHP.)

categories PHP
tags java, language-comparison, mvc, PHP

Related Posts

  • A Comparison of the PHP and Java Job Markets
  • API Design
  • Comparing PHP with other languages
  • Zend Framework Webcast
  • A Glimpse into the Future: PHP 6
You can leave a response, or trackback from your own site.

One Response to “PHP first impressions from a J2EE programmer”

  1. #1 Cedric responds...
    February 20th, 2005 at 6:01 pm

    Hi Jeff,

    Indeed, a stricter error reporting is quite useful, but I suppose I’ll have to set it in my PHP code since my ISP will most likely not let me edit their PHP.ini.

    Thanks for the comment.

    –
    Cedric

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

code: use [code=php][/code].

Comment Preview

  • Search

  • Subscribe

    Subscribe All Posts
    Subscribe All Comments
    Subscribe All Bookmarks
    Subscribe with Bloglines Subscribe with My Yahoo Add to netvibes Subscribe in NewsGator Online Add to Google
  • Share This

  • Categories (Home)

    • Agile Methods (14)
    • Mac (14)
    • Misc (16)
    • Open Source (14)
    • PHP (95)
    • Software Design (28)
    • Usability (14)
    • WACT (7)
    • Web Design (20)
  • Recent Comments

    • How to Transfer Mac OS X Application Data between Computers  38
      help, please?, Toby, Secret Santa [...]
    • The Problem with Markup Languages  10
      Wayne Whitty, Aaron Saray, Jack Teese [...]
    • Firefox Extensions for Web Developers  16
      lawyers2, Markus, Mitch [...]
    • PHP 5.1 is out  6
      Pochka, Anal Master, Joey [...]
    • Why is PHP Popular?  24
      downgams.ru, naruzhkas.ru, cablingworks.ru [...]
    • Working with PHP 5 in Mac OS X 10.5 (Leopard)  104
      Iman, irisv, Massimo [...]
    • PHP Development From Java Architects Eye  10
      ebezutyzuba, Bobrila, FelhoBacsi [...]
    • The Legality of Republishing RSS Feeds  16
      Andrew, Matt, Mandi [...]
    • nofollow and comment spam  4
      Tanya, sss, Nataly Marshak [...]
    • The PHP scalability saga continues  6
      uswipyq, 网上购物, Harry Fuecks [...]
    • php | tek 2008  4
      , Saumava, NatureLimit [...]
  • Pages

    • Tags
  • Recent Posts

    • php | tek Wrapup
    • php | tek 2008
    • Sarah Snow Stever
    • Benchmarking PHP’s Magic Methods
    • The Endpoints of the Scale of Stupidity on Video
    • Working with PHP 5 in Mac OS X 10.5 (Leopard)
    • Keywords and Language Simplicity
    • Improved Error Messages in PHP 5
    • Michigan Taxes Graphic Design Services
    • Ruby versus PHP or There and Back Again
  • Archives

    • 2008: May
    • 2007: Jan Feb Mar Apr May Sep Oct Nov
    • 2006: Jan Feb Mar Apr May Jun Jul Oct Nov Dec
    • 2005: Jan Feb Mar Apr May Sep Oct Nov Dec
    • 2004: Apr May Jun Jul Aug Sep Oct Nov
  • Menu

    • Register
    • Log in