PHP script for electric calcs