It's possible if you are using PHP 5.3.0 or higher. See Anonymous Functions in the manual. In your case, you would define exampleMethod like ... ... <看更多>
This API uses inlining to improve applications performance compared with the zend_parse_parameters() function described below. Parameter parsing functions. ... <看更多>
You second JS setting is more in the right direction, your biggest failure seems in misunderstanding how ajax requests are handled on the WP PHP/server side ... ... <看更多>