Jamie Balfour

Welcome to my personal website.

Find out more about me, my personal projects, reviews, courses and much more here.

Official ZPE/YASS documentationcopy_of

copy_of (mixed value) ⇒ mixed

Returns a pure copy of a value.

First available: Version 1.9.13

Notes

Prior to the introduction of this, ZPETypes such as the ZPEFunction, ZPEList, ZPEAssociativeArray, ZPEString and ZPEObject data types could not directly be copied. Since ZPE uses by reference when using variable assignment changes made to one ZPEType affect any other instances of it.
YASS
$x = [11, 22, 33]
$y = $x
$y[1] = 44

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

Comments

There are no comments on this page.

New comment

Comments are welcome and encouraged, including disagreement and critique. However, this is not a space for abuse. Disagreement is welcome; personal attacks, harassment, or hate will be removed instantly. This site reflects personal opinions, not universal truths. If you can’t distinguish between the two, this probably isn’t the place for you.

copy_of"/>

Comments powered by BalfComment

Feedback 👍
Comments are sent via email to me.