Nginx memcache or pecl memcache?

Which I should use? Memcache from nginx or memcache from pecl? Maybe
both? What benefits have using memcache via nginx opposite do memcache
via php?

Posted at Nginx Forum:

That’s comparing apples and oranges really. One is at the webserver
level and one is at the sapi level.

You’ll have greater control and flexibility with php, however doing it
at the webserver level could save you from needing to execute php.