We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b8ea4a5 commit e9000a4Copy full SHA for e9000a4
1 file changed
src/functions.php
@@ -560,13 +560,17 @@ function get_object_dump_values(
560
object $object,
561
?int $filter = null
562
): array {
563
- return array_map(
564
- static fn(\ReflectionProperty $prop) => $prop->getValue($object),
565
- get_object_dump_props(
566
- $object,
567
- $filter
568
- )
569
- );
+ $props = get_object_dump_props($object, $filter);
+ $vars = get_object_vars($object);
+
+ $values = array_intersect_key($vars, $props);
+ $diffProps = array_diff_key($props, $vars);
+ foreach ($diffProps as $name => $prop) {
570
+ $values[$name] = $prop->getValue($object);
571
+ }
572
573
+ return $values;
574
}
575
576
0 commit comments