Predefined function reference

copy_of

A reference entry for copy_of

Predefined function · core

copy_of (mixed value) ⇒ mixed

Returns a pure copy of a value.

Notes

YASS
$x = [11, 22, 33]
$y = $x
$y[1] = 44

//Will print [11, 44, 33]
print($x)