How myphp uses the embed SAPI:
php_embed_init(args->arg_count, rv->argv PTSRMLS_CC);
zend_first_try {
    myphp_eval_string(rv->argv[0], zv, "MySQL/PHP" TSRMLS_CC);
} zend_end_try();
php_embed_shutdown(TSRMLS_C);