Resolved type error with swig for php