Should I fix my iPhone or get a new one?

Its an iPhone 4, no longer under warranty and the screen is completely shattered and the lock button doesn't work. Should I get a new one or replace it?

The problem
Is if you replace it you may not have warranty. So if you spend the $150 or more to replace the screen, and something else still doesn't work then you have a problem, not only did you spend money to fix it, you'll still have to spend money to replace it. I'd replace it. Buy one on Craigslist if you still have a contract in your current one. Then sell your current phone as is, online. You can probably still get $100 or so back for it. My friends iPhone 5 was recently shattered, he took it to apple, and they said the cost of fixing it was more than its worth, so he had to spend $250 on an in store replacement.

It's a simple matter of math and your options. Find out how much it will cost to fix. After you fix it, how much can you sell it for later. Is it worth all the hassle? You may be able to sell it broken too. If you fixed it for a certain price, would you be happy to continue using the old phone? Do you have a upgrade available from your carrier?