There is no 'best' one out of the two really. I sometimes use php, sometimes python, sometimes perl depending on what I want to do - all are capable of producing 'quick' working programs. For more complex powerful fast processing I use C, C#, C++ or assembler but they have a steep learning curve. I would say python is probably easier to pick up because it looks more human readable than php (I prefer php though because it is interpreted ie line by line and a little more descriptive/forgiving on any errors) but there is nothing that one can do but the other can't. I would suggest dipping into both and then pushing forward with your favourite.