Memory exhusted using $page->uuid()

I am trying to use $page->uuid() in a controller but for some reason it causes Kirby to run out of memory.

I think its something do with turning some data back in to Yaml as its line 251 of /kirby/dependencies/spyc/Spyc.php that causes the error.

How can i getg arround this?

I think its because its giving me the whole UUID object back. I literally want to retrieve the value of

Uuid: UAGqPQGUw6xSK0K7

As it is stored in the content file. How can i get that?

I have looked there but its not the value or the id i want. i cant seem to get the UAGqPQGUw6xSK0K7 part.

Yes,

$page->uuid()->id()

ahhh i did $page->uid() which isnt the same. Thanks @texnixe im obviously blind today.