Modify php snippet