强制linux使用php作为php55

Helllo, I have a little problem here.

I have PHP 5.3 installed and it's accessible via php command, I also have php 5.5 accessible as php55 command.

Now I need to force linux to use php55 when I write php command.

Simple way: How I switch the versions of php?

I am using Fedora 21 OS

You can create an alias:

alias php="php55"

Now if you type php it uses php55

PHP typically installs its binary at /usr/bin/php (not all installs might do that tho, so YMMV). So what you could do is symlink the PHP binary to your php55 command like this (assumes the paths are correct)

ln -s /path/to/php55 /usr/bin/php