I want to use ethereum php lib and I need to set a node in the script to replace 127.0.0.1 and port 8545. What kind of node I use min space and min ram so it will save me money to set the node up Use a geth node or parity node? In light or fast mode? Or I can use some way to min the space and cost. So I can use eth sign and send transaction
If you want the lowest cost (space and time) try to find a solution that allows you to use https://infura.io/ . This solution will cost money after a certain transaction amount.
Geth / Partiy processing time evaluation (note: it's from parity, more sources required): https://www.parity.io/performance-analysis/
Geth / Parity full-node space consumption: https://etherscan.io/chartsync/chaindefault
Parity light-node space consumption: https://wiki.parity.io/FAQ#light-node
A light node should be sufficient for your case. Would be nice if you can allocate some resources to support the network with a full-node though.