Blog Post RSS ?

Blogs » PHP » Reason to like PHP?
 

Reason to like PHP?

by Harry Fuecks

Perl;


print { open my $out, ">", "pidfile"; $out or die } $$, "\n";

Ruby;


File.open('pidfile', 'w+'){ |fh| fh.puts Process.pid }

I could have used ‘$$’ instead of Process.pid, but I prefer readability

PHP;


file_put_contents( 'pidfile', getmypid() );

Yeah I know, I know but anyway…

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Ping.fm
  • Twitthis

Related posts:

  1. Generating PHP with Ruby
  2. Roll your own dispatch reaper script
  3. PHP Security, Answered
  4. The State of Web Development: PHP developers most likely to switch to Rails
  5. Introducing php-tracer-weaver

This post has 61 responses so far

Sponsored Links