creating PHP C/C++ extension modules using SWIG
Asked Answered
N

1

14

I have written some C/C++ extension modules for PHP, using the 'old fashioned way' - i.e. by using the manual way (as described by Sarah Golemon in her book).

This is too fiddly for me, and since I am lazy, and would like to automate as much as possible. Also, I have used SWIG now to generate extensions to Python, and I am getting to like using it quite a lot.

I am thinking of using SWIG to generate my future PHP extensions. I am using PHP v5.2 (and above) on my production servers.

My questions are:

  1. Is SWIG PHP interface stable yet (i.e. ready for production)?
  2. If you answered yes to question 1 -are YOU using it in YOUR production site?
  3. Are there any 'gotchas' I need to be aware of when creating PHP extension ,modules using SWIG?
Naarah answered 31/5, 2010 at 6:5 Comment(1)
Did you switch to using swig for PHP, and how did you get on? I've found others saying it is more trouble than it is worth and it simpler to just write PHP extensions the "old-fashioned way", but I'd like to hear views from people like you who've done both ways.Psychometrics
P
1

I have extensively used SWIG in production environment for generating PHP wrappers. Its pretty stable and can be used without issues.

Pelpel answered 13/6, 2010 at 12:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.