}
while (zv) {
- /* start off with a global PHP annotation instead of repeating it all over the place */
- if (0 == php_ion_globals_serializer_step()) {
- ION_STRING is;
- ION_CHECK(ion_writer_add_annotation(ser->writer, ion_string_assign_cstr(&is, ZEND_STRL("PHP"))));
- }
+ php_ion_globals_serializer_step();
php_ion_serialize_zval(ser, zv);
php_ion_globals_serializer_exit();
DONE
--EXPECTF--
TEST
-PHP::[R::r::0]
+[R::r::0]
array(1) {
[0]=>
*RECURSION*
}
-PHP::[[R::r::1],["a",r::4,o::{},r::5,[1,2,3],r::6],r::3,r::4,r::5,r::6]
+[[R::r::1],["a",r::4,o::{},r::5,[1,2,3],r::6],r::3,r::4,r::5,r::6]
array(6) refcount(2){
[0]=>
array(1) refcount(2){
DONE
--EXPECTF--
TEST
-PHP::{'null':null,bool:true,int:123,double:12%f,string:"foobar",object:o::{prop:"data"}}
+{'null':null,bool:true,int:123,double:12%f,string:"foobar",object:o::{prop:"data"}}
bool(true)
DONE
DONE
--EXPECTF--
TEST
-PHP::E::e::a
+E::e::a
enum(e::a)
-PHP::E::i::b
+E::i::b
enum(i::b)
-PHP::E::s::a
+E::s::a
enum(s::a)
DONE
DONE
--EXPECTF--
TEST
-PHP::O::magic::{priv:1,prot:2,pub:3}
+O::magic::{priv:1,prot:2,pub:3}
object(magic)#%d (3) {
["priv":"magic":private]=>
int(1)
DONE
--EXPECTF--
TEST
-PHP::c::popo::{priv:p::popo::1,prot:p::'*'::2,pub:3}
+c::popo::{priv:p::popo::1,prot:p::'*'::2,pub:3}
object(popo)#%d (3) {
["priv":"popo":private]=>
int(1)
Deprecated: recursive implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %sserialize/serializable.php on line %d
-PHP::[S::test::"foobar",r::1]
+[S::test::"foobar",r::1]
array(2) refcount(2){
[0]=>
object(test)#%d (1) refcount(2){
NULL
}
}
-PHP::S::recursive::"node:S::recursive::\"leaf\""
+S::recursive::"node:S::recursive::\"leaf\""
object(recursive)#%d (2) refcount(1){
["id":"recursive":private]=>
string(4) "node" refcount(1)