A man has been charged with attempted murder after authorities allege he tried to grab a suburban Philadelphia police officer’s gun from its holster and the weapon went off, wounding the officer.