scotfl.ca

Ugh, PHP

Ce n’est pas functional programming:

array_walk($line, create_function('&$i', '$i = trim($i);'));

(Especially since syntax highlighting sees the ‘code’ as a string.)

This entry was posted on 9 October 2006 at 21:55 and is filed under Uncategorized. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

One Response to “Ugh, PHP”

  1. Ben HoskingsOctober 26th, 2006 at 23:18

    You’re right – Ugh. :) Haven’t really ever used PHP, but I assume in Ruby this would be

    line.map! { |i| trim i }

    Ahh, much better.