Most of the Pharisees knew an awful lot about religion but didn't personally know God. Just having knowledge of the Word of God and studying it isn't going to get you to Heaven. Being good and behaving your best won't either. Acting religious won't get you there either.
If we worship God but our hearts are far from Him then our worship is in vain. And when you stand before Him one day He will say, "Go away from me , I never knew you."
We have to respond to God and accept His way of salvation which is Jesus Christ who died for your sins and mine on the cross. And walk and talk like we belong to HIm.
Matthew 15: 8,9 Jesus says, "These people honor me with their lips, but their hearts are far from me. They worship me in vain; their teachings are but rules taught by men."
Let's pray and ask God to search our hearts to be sure we're not a Pharisee.