suidhiuhsd
New Member
Writing a PHP extension in C, I want to convert a userland object (\[code\]IS_OBJECT\[/code\]) to a string through \[code\]__toString()\[/code\] if it has one, and fail otherwise. What should I use?I don't need another \[code\]zval\[/code\] on output, just a \[code\]char *\[/code\].\[code\]zval *zo;switch (Z_TYPE_P(zo)) {case IS_STRING: ... Z_STRVAL_P(zo) ... break;case IS_OBJECT: ... ???(zo) ... break;...}\[/code\]