Originally posted by jerdo
Perl can do many things that PHP doesn't normally do. Such as run as a normal user instead of Apache. This is helpful if you don't have root access and need to ssh in to modify files, if the file was created with PHP you would need to create a PHP script to modify the file (unless you are in the Apache group and have the permissions on the file set correctly, or as mentioned before can access the system as root).
actually, those capabilities are determined by whether you're running PHP or Perl as a CGI (suexec capable) or as a mod (mod_perl or mod_php) wherein the code is run as the apache user.
One of the things Perl is generally better at than PHP is handling I/O streams. I'm not even sure where to start trying to get PHP to run as a stream editor, although I'm sure it's possible.
Out of curiosity, why would a php programmer need to learn C++?? Not that I don't want to learn it or anything...
The main advantage to knowing C is that you can fix things yourself if they're broken.
Way back when (apache 1.3.4 or so) the htpasswd command would NOT accept a password argument. I was putting a corporate site online that needed to be able to add accounts to the apache server's .htpasswd file, so I went in and edited the apache htpasswd code to accept a password argument. I'm no C god or anything, but it was easy enough to do, and a couple versions later (1.3.12 or so) apache had that feature, almost exactly the same as I had implemented it.
I've also found a couple of bugs in other packages and fixed them, or put in work arounds.
Being able to write PHP is good, being able to troubleshoot an apache module is real job security.
Other good talents to have:
Database design / stored procedures. If you can implement a fair bit of your logic in the database layer, you can often speed up complex database driven apps by a factor of 10 or more. Triggers use stored procs and are extremely useful.
OpenLDAP is a nice package to learn/understand.
Understanding underlying server technologies like LVM or RAID in Linux is quite useful.
ulimit (resource limits)
The Gimp / Photoshop
download and play with htdig, a nice little search engine. The beta can do phrase searching, and it's lightening fast. On a web server with literally hundreds of gigabytes of corporate info, it takes about 1 to 2 hours to index, and results come back from searches in <1 second every time.
bash / et. al. shell programming in Unix.