What is the meaning of Acts 23:6?

6 But when Paul perceived that the one part were Sadducees, and the other Pharisees, he cried out in the council, Men and brethren, I am a Pharisee, the son of a Pharisee: of the hope and resurrection of the dead I am called in question. (Acts 23:6 KJV)

William Burkitt’s Commentary

Observe here, The innocent policy that the apostle uses for his own preservation: he, perceiving that the council before whom he stood were not all of one piece but patched up of Pharisees and Sadducees, he publicly professes himself a Pharisee by education, and of that persuasion now in point of the resurrection.

Thus at once he cast in a bone of contention between the Sadducees who denied the resurrection and the Pharisees who owned it; and obliged the Pharisees, at least concerning that opinion, to take his side. So by pious prudence, he turned their opposition against him upon one another and, by setting them at variance, he might the better escape.

Learn hence, that an innocent and prudent policy may warrantably be made use of by the members and ministers of Jesus Christ, without any blemish to their holy profession, in order to our preservation from the hands of persecutors; a serpentine subtlety may be made use of, together with a dovelike innocence. Thus did St. Paul here: when he perceived that one part was Sadducees,  and the other part was Pharisees,  he cried out, &c.