Hi,
i think is depending from platform.
In window machine i think the better is C++ (borland for visual, ms for opengl & console...)
In linux c++ is GCC. There are porting from builder and msc++ (like qt or kdesdk...) but GCC is portable on every linux machine.
IF you want code for all this, you have to choice JAVA 🙁
PHP, for me is max of liberties. You can do anything in hundred different way.
The first (c/c++), instead, is a little step from php, only difference is declaration of var and a LOT of function less. But there are even much liberties.
The second(JAVA) is the other side of php: declare, declare, declare. Only object and not liberties. It's dream of any your boss 😃 and a LOT of function more (no boss, yes boss i'm saying "class", not function, ok...he hear always my key! 😃)
Another language? better php 😃