PHP weirdness

June 1, 2006

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)));"