For Programmers: Free Programming Magazines  


Home > Archive > PHP Zend Engine > July 2007 > cvs: ZendEngine2(PHP_5_2) /tests array_append_COW.phpt array_unshift_COW.phpt









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author cvs: ZendEngine2(PHP_5_2) /tests array_append_COW.phpt array_unshift_COW.phpt
Zoe Slattery

2007-07-09, 6:57 pm

zoe Mon Jul 9 13:23:37 2007 UTC

Added files: (Branch: PHP_5_2)
/ZendEngine2/tests array_unshift_COW.phpt array_append_COW.phpt
Log:
array copy on write tests


http://cvs.php.net/viewvc.cgi/ZendE...=markup&rev=1.1
Index: ZendEngine2/tests/array_unshift_COW.phpt
+++ ZendEngine2/tests/array_unshift_COW.phpt
--TEST--
Tests that array unshift code is correctly dealing with copy on write and
splitting on reference.
--FILE--
<?php
$a=array();
$b=1;
$c=&$b;
array_unshift ($a,$b);
$b=2;
var_dump ($a);
?>
--EXPECT--
array(1) {
[0]=>
int(1)
}
--EXPECT--
array(1) {
[0]=>
int(1)
}
http://cvs.php.net/viewvc.cgi/ZendE...=markup&rev=1.1
Index: ZendEngine2/tests/array_append_COW.phpt
+++ ZendEngine2/tests/array_append_COW.phpt
--TEST--
Tests that array manipulation code is correctly dealing with copy on write and
splitting on reference.
--FILE--
<?php
$a=array();
$b=1;
$c=&$b;
$a[]=$b;
$b=2;
var_dump ($a);
?>
--EXPECT--
array(1) {
[0]=>
int(1)
}
--UEXPECT--
array(1) {
[0]=>
int(1)
}
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com