Can this be done?
No idea if the Cython .so extension can be dynamic loaded from a php script or does it needs any extra manage?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The short answer is no. Cython extensions use the Python C API, so they can’t be loaded and called directly from PHP. They will typically take and return PyObject structs as arguments (Python objects). You’ll need a Python <-> PHP binding to load the .so and do object conversion.