"Therefore Jesus Christ was both the treasure he cherished and the one who provided the right to have the treasure. In Christ alone Paul had a right to know and gain Christ. And that is all he wanted. That is the gospel. This is what we mean by treasuring Christ together. Christ alone is the ground of our acceptance with God and the goal of our heart's desire. He is our righteousness and our reward. Compared to him (knowing him, gaining him, being found in him) all else is garbage.
"Then come three of the best verses in all the Bible. In essence: the victory I just won in the contest of the flesh is a pile of garbage (the Greek is sku,bala, v. 8). And the reason he uses such a strong word (refuse!) is that the alternative is Christ. Compared to Christ being the greatest Pharisee of his time was foul garbage.
"But that is too vague. He is not vague. He does not say simply that compared to Christ legal achievements are garbage; he is more specific. He says that what is superior to moral and religious achievements is 1) knowing Christ, 2) gaining Christ, and 3) being found in Christ."
7 But whatever things were gain to me, those things I have counted as loss for the sake of Christ.
8 More than that, I count all things to be loss in view of the surpassing value of knowing Christ Jesus my Lord, for whom I have suffered the loss of all things, and count them but rubbish so that I may gain Christ,
9 and may be found in Him, not having a righteousness of my own derived from the Law, but that which is through faith in Christ, the righteousness which comes from God on the basis of faith,
10 that I may know Him and the power of His resurrection and the fellowship of His sufferings, being conformed to His death;
11 in order that I may attain to the resurrection from the dead.
12 Not that I have already obtained it or have already become perfect, but I press on so that I may lay hold of that for which also I was laid hold of by Christ Jesus.
13 Brethren, I do not regard myself as having laid hold of it yet; but one thing I do: forgetting what lies behind and reaching forward to what lies ahead,
14 I press on toward the goal for the prize of the upward call of God in Christ Jesus.
Phillipians 3:7-14
Read The Treasure that Turns Other Treasure to Garbage, by John Piper