19 $vars = (array)$object;
20 $class = new \ReflectionClass( $object );
22 foreach ( $class->getProperties() as $property ) {
25 if ( $property->isPrivate() ) {
26 $mangledName =
"\0{$class->name}\0{$property->name}";
27 } elseif ( $property->isProtected() ) {
28 $mangledName =
"\0*\0{$property->name}";
30 $mangledName = $property->name;
32 if ( isset( $vars[$mangledName] ) && !is_scalar( $vars[$mangledName] ) ) {
33 $vars[$mangledName] =
new Placeholder( $vars[$mangledName] );
37 $class = $class->getParentClass();