Modified version of Laravels paste for php 5.5 compatibility