PHP weirdness
Thu Jun 01, 2006 · 27 words

This doesn't work as expected:

echo "foo:bar" | php -r "print str_replace(':','-','php://stdin');"

Must investigate. Maybe try with another machine…

UPDATE:

echo "foo:bar" | php -r "print str_replace(':','-',trim(fgets(STDIN)));"

back · essays · credits ·