Sciweavers

POPL
2009
ACM

Copy-on-write in the PHP language

14 years 11 months ago
Copy-on-write in the PHP language
PHP is a popular language for server-side applications. In PHP, assignment to variables copies the assigned values, according to its so-called copy-on-assignment semantics. In contrast, a typical PHP implementation uses a copy-on-write scheme to reduce the copy overhead by delaying copies as much as possible. This leads us to ask if the semantics and implementation of PHP coincide, and actually this is not the case in the presence of sharings within values. In this paper, we describe the copy-on-assignment semantics with three possible strategies to copy values containing sharings. The current PHP implementation has inconsistencies with these semantics, caused by its na?ive use of copy-on-write. We fix this problem by the novel mostly copy-on-write scheme, making the copy-onwrite implementations faithful to the semantics. We prove that our copy-on-write implementations are correct, using bisimulation with the copy-on-assignment semantics. Categories and Subject Descriptors D.3.0 [Prog...
Akihiko Tozawa, Michiaki Tatsubori, Tamiya Onodera
Added 22 Nov 2009
Updated 22 Nov 2009
Type Conference
Year 2009
Where POPL
Authors Akihiko Tozawa, Michiaki Tatsubori, Tamiya Onodera, Yasuhiko Minamide
Comments (0)