# Need some help about using Boost.PHP to make extensions

- Thread: https://externals.io/message/41987
- Original archive: https://news-web.php.net/php.internals/41987
- Started by Chris Jiang on 2008-11-18T17:13:32+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #41987 — Chris Jiang — 2008-11-18T17:13:32+00:00

URL: https://externals.io/message/41987#41987

Hi all, it's been a while since my last thread. I've been playing around 
with Boost.PHP these days, and find it pretty much satisfactory. Now, I 
need some help on how Boost.PHP treat with PHP arrays. Not complaining, 
but there isn't much document I can learn from the official website.

And if this thread is NOT totally about PHP, I'm sorry about this. This 
mailing list is the only place possibly I can find answers about it. I 
can't find a suitable C/C++ forum to ask this question since they don't 
work with PHP though. :(

I'm trying to get an array('key'=>'val') (associative array) as 
argument, and return a std::string of 'key:val' back to PHP. Now, I can 
get the keys but not the arrays. I thought there might be something 
wrong with how I was using php::array::const_reference.

Can anyone be so kind to explain how it works? Or perhaps a piece of 
working code that I can learn about?

Thank you!

---

## #41999 — Moriyoshi Koizumi — 2008-11-19T19:29:04+00:00

URL: https://externals.io/message/41987#41999 · In reply to: #41987

Please redirect your question to me. Boost.PHP is not an official part
of the PHP project.

Moriyoshi


> Hi all, it's been a while since my last thread. I've been playing around
> with Boost.PHP these days, and find it pretty much satisfactory. Now, I need
> some help on how Boost.PHP treat with PHP arrays. Not complaining, but there
> isn't much document I can learn from the official website.
>
> And if this thread is NOT totally about PHP, I'm sorry about this. This
> mailing list is the only place possibly I can find answers about it. I can't
> find a suitable C/C++ forum to ask this question since they don't work with
> PHP though. :(
>
> I'm trying to get an array('key'=>'val') (associative array) as argument,
> and return a std::string of 'key:val' back to PHP. Now, I can get the keys
> but not the arrays. I thought there might be something wrong with how I was
> using php::array::const_reference.
>
> Can anyone be so kind to explain how it works? Or perhaps a piece of working
> code that I can learn about?
>
> Thank you!
