diff options
author | SVN Migration <svn@php.net> | 2006-10-15 21:09:28 +0000 |
---|---|---|
committer | SVN Migration <svn@php.net> | 2006-10-15 21:09:28 +0000 |
commit | 88ec761548b66f58acc1a86cdd0fc164ca925476 (patch) | |
tree | d0af978fa00d83bb1d82c613f66477fbd6bb18aa /ext/standard/tests/serialize | |
parent | 268984b4787e797db6054313fc9ba3b9e845306e (diff) | |
download | php-git-PECL_OPENSSL.tar.gz |
This commit was manufactured by cvs2svn to create branch 'PECL_OPENSSL'.PECL_OPENSSL
Diffstat (limited to 'ext/standard/tests/serialize')
20 files changed, 0 insertions, 883 deletions
diff --git a/ext/standard/tests/serialize/001.phpt b/ext/standard/tests/serialize/001.phpt deleted file mode 100644 index 21a2d6c534..0000000000 --- a/ext/standard/tests/serialize/001.phpt +++ /dev/null @@ -1,120 +0,0 @@ ---TEST-- -serialize()/unserialize()/var_dump() ---FILE-- -<?php -class t -{ - function t() - { - $this->a = "hallo"; - } -} - -class s -{ - public $a; - public $b; - public $c; - - function s() - { - $this->a = "hallo"; - $this->b = "php"; - $this->c = "world"; - $this->d = "!"; - } - - function __sleep() - { - echo "__sleep called\n"; - return array("a","c"); - } - - function __wakeup() - { - echo "__wakeup called\n"; - } -} - - -echo serialize(NULL)."\n"; -echo serialize((bool) true)."\n"; -echo serialize((bool) false)."\n"; -echo serialize(1)."\n"; -echo serialize(0)."\n"; -echo serialize(-1)."\n"; -echo serialize(2147483647)."\n"; -echo serialize(-2147483647)."\n"; -echo serialize(1.123456789)."\n"; -echo serialize(1.0)."\n"; -echo serialize(0.0)."\n"; -echo serialize(-1.0)."\n"; -echo serialize(-1.123456789)."\n"; -echo serialize("hallo")."\n"; -echo serialize(array(1,1.1,"hallo",NULL,true,array()))."\n"; - -$t = new t(); -$data = serialize($t); -echo "$data\n"; -$t = unserialize($data); -var_dump($t); - -$t = new s(); -$data = serialize($t); -echo "$data\n"; -$t = unserialize($data); -var_dump($t); - -$a = array("a" => "test"); -$a[ "b" ] = &$a[ "a" ]; -var_dump($a); -$data = serialize($a); -echo "$data\n"; -$a = unserialize($data); -var_dump($a); -?> ---EXPECTF-- -N; -b:1; -b:0; -i:1; -i:0; -i:-1; -i:2147483647; -i:-2147483647; -d:1.123456789000000011213842299184761941432952880859375; -d:1; -d:0; -d:-1; -d:-1.123456789000000011213842299184761941432952880859375; -s:5:"hallo"; -a:6:{i:0;i:1;i:1;d:1.100000000000000088817841970012523233890533447265625;i:2;s:5:"hallo";i:3;N;i:4;b:1;i:5;a:0:{}} -O:1:"t":1:{s:1:"a";s:5:"hallo";} -object(t)#%d (1) { - ["a"]=> - string(5) "hallo" -} -__sleep called -O:1:"s":2:{s:1:"a";s:5:"hallo";s:1:"c";s:5:"world";} -__wakeup called -object(s)#%d (3) { - ["a"]=> - string(5) "hallo" - ["b"]=> - NULL - ["c"]=> - string(5) "world" -} -array(2) { - ["a"]=> - &string(4) "test" - ["b"]=> - &string(4) "test" -} -a:2:{s:1:"a";s:4:"test";s:1:"b";R:2;} -array(2) { - ["a"]=> - &string(4) "test" - ["b"]=> - &string(4) "test" -} diff --git a/ext/standard/tests/serialize/002.phpt b/ext/standard/tests/serialize/002.phpt deleted file mode 100644 index 3085d1cf4f..0000000000 --- a/ext/standard/tests/serialize/002.phpt +++ /dev/null @@ -1,44 +0,0 @@ ---TEST-- -Bug #25378 (unserialize() crashes with invalid data) ---FILE-- -<?php -var_dump(unserialize('b:0;')); -var_dump(unserialize('b:1;')); -var_dump(unserialize('i:823;')); -var_dump(unserialize('s:0:"";')); -var_dump(unserialize('s:3:"foo";')); -var_dump(unserialize('a:1:{i:0;s:2:"12";}')); -var_dump(unserialize('a:2:{i:0;a:0:{}i:1;a:0:{}}')); -var_dump(unserialize('a:3:{i:0;s:3:"foo";i:1;s:3:"bar";i:2;s:3:"baz";}')); -var_dump(unserialize('O:8:"stdClass":0:{}')); -?> -===DONE=== ---EXPECTF-- -bool(false) -bool(true) -int(823) -string(0) "" -string(3) "foo" -array(1) { - [0]=> - string(2) "12" -} -array(2) { - [0]=> - array(0) { - } - [1]=> - array(0) { - } -} -array(3) { - [0]=> - string(3) "foo" - [1]=> - string(3) "bar" - [2]=> - string(3) "baz" -} -object(stdClass)#%d (0) { -} -===DONE=== diff --git a/ext/standard/tests/serialize/003.phpt b/ext/standard/tests/serialize/003.phpt deleted file mode 100644 index 173f57b72c..0000000000 --- a/ext/standard/tests/serialize/003.phpt +++ /dev/null @@ -1,25 +0,0 @@ ---TEST-- -unserialize() floats with E notation (#18654) ---INI-- -precision=12 -serialize_precision=100 ---FILE-- -<?php -foreach(array(1e2, 5.2e25, 85.29e-23, 9e-9) AS $value) { - echo ($ser = serialize($value))."\n"; - var_dump(unserialize($ser)); - echo "\n"; -} -?> ---EXPECTREGEX-- -d:100; -float\(100\) - -d:5\.2E\+25; -float\(5\.2E\+25\) - -d:8\.52[89][0-9]+E-22; -float\(8\.529E-22\) - -d:9\.[0-9]*E-9; -float\(9\.0E-9\) diff --git a/ext/standard/tests/serialize/004.phpt b/ext/standard/tests/serialize/004.phpt deleted file mode 100644 index a4a7c68d6f..0000000000 --- a/ext/standard/tests/serialize/004.phpt +++ /dev/null @@ -1,33 +0,0 @@ ---TEST-- -serialize()/unserialize() floats in array. ---INI-- -precision=12 -serialize_precision=100 ---FILE-- -<?php -error_reporting (E_ALL); -$a = array(4); -$str = serialize($a); -print('Serialized array: '.$str."\n"); -$b = unserialize($str); -print('Unserialized array: '); -var_dump($b); -print("\n"); -$str = serialize(array(4.5)); -print('Serialized array: '.$str."\n"); -$b = unserialize($str); -print('Unserialized array: ') ; -var_dump($b); -?> ---EXPECT-- -Serialized array: a:1:{i:0;i:4;} -Unserialized array: array(1) { - [0]=> - int(4) -} - -Serialized array: a:1:{i:0;d:4.5;} -Unserialized array: array(1) { - [0]=> - float(4.5) -} diff --git a/ext/standard/tests/serialize/005.phpt b/ext/standard/tests/serialize/005.phpt deleted file mode 100755 index d67f6fbf70..0000000000 --- a/ext/standard/tests/serialize/005.phpt +++ /dev/null @@ -1,186 +0,0 @@ ---TEST-- -serialize()/unserialize() objects ---SKIPIF-- -<?php if (!interface_exists('Serializable')) die('skip Interface Serialzable not defined'); ?> ---FILE-- -<?php - -// This test verifies that old and new style (un)serializing do not interfere. - -function do_autoload($class_name) -{ - if ($class_name != 'autoload_not_available') - { - require_once(dirname(__FILE__) . '/' . strtolower($class_name) . '.p5c'); - } - echo __FUNCTION__ . "($class_name)\n"; -} - -function unserializer($class_name) -{ - echo __METHOD__ . "($class_name)\n"; - switch($class_name) - { - case 'TestNAOld': - eval("class TestNAOld extends TestOld {}"); - break; - case 'TestNANew': - eval("class TestNANew extends TestNew {}"); - break; - case 'TestNANew2': - eval("class TestNANew2 extends TestNew {}"); - break; - default: - echo "Try __autoload()\n"; - if (!function_exists('__autoload')) - { - eval('function __autoload($class_name) { do_autoload($class_name); }'); - } - __autoload($class_name); - break; - } -} - -ini_set('unserialize_callback_func', 'unserializer'); - -class TestOld -{ - function serialize() - { - echo __METHOD__ . "()\n"; - } - - function unserialize($serialized) - { - echo __METHOD__ . "()\n"; - } - - function __wakeup() - { - echo __METHOD__ . "()\n"; - } - - function __sleep() - { - echo __METHOD__ . "()\n"; - return array(); - } -} - -class TestNew implements Serializable -{ - protected static $check = 0; - - function serialize() - { - echo __METHOD__ . "()\n"; - switch(++self::$check) - { - case 1: - return NULL; - case 2: - return "2"; - } - } - - function unserialize($serialized) - { - echo __METHOD__ . "()\n"; - } - - function __wakeup() - { - echo __METHOD__ . "()\n"; - } - - function __sleep() - { - echo __METHOD__ . "()\n"; - } -} - -echo "===O1===\n"; -var_dump($ser = serialize(new TestOld)); -var_dump(unserialize($ser)); - -echo "===N1===\n"; -var_dump($ser = serialize(new TestNew)); -var_dump(unserialize($ser)); - -echo "===N2===\n"; -var_dump($ser = serialize(new TestNew)); -var_dump(unserialize($ser)); - -echo "===NAOld===\n"; -var_dump(unserialize('O:9:"TestNAOld":0:{}')); - -echo "===NANew===\n"; -var_dump(unserialize('O:9:"TestNANew":0:{}')); - -echo "===NANew2===\n"; -var_dump(unserialize('C:10:"TestNANew2":0:{}')); - -echo "===AutoOld===\n"; -var_dump(unserialize('O:19:"autoload_implements":0:{}')); - -// Now we have __autoload(), that will be called before the old style header. -// If the old style handler also fails to register the class then the object -// becomes an incomplete class instance. - -echo "===AutoNA===\n"; -var_dump(unserialize('O:22:"autoload_not_available":0:{}')); -?> -===DONE=== -<?php exit(0); ?> ---EXPECTF-- -===O1=== -TestOld::__sleep() -string(18) "O:7:"TestOld":0:{}" -TestOld::__wakeup() -object(TestOld)#%d (0) { -} -===N1=== -TestNew::serialize() -string(2) "N;" -NULL -===N2=== -TestNew::serialize() -string(19) "C:7:"TestNew":1:{2}" -TestNew::unserialize() -object(TestNew)#%d (0) { -} -===NAOld=== -unserializer(TestNAOld) -TestOld::__wakeup() -object(TestNAOld)#%d (0) { -} -===NANew=== -unserializer(TestNANew) -TestNew::__wakeup() -object(TestNANew)#%d (0) { -} -===NANew2=== -unserializer(TestNANew2) -TestNew::unserialize() -object(TestNANew2)#%d (0) { -} -===AutoOld=== -unserializer(autoload_implements) -Try __autoload() -do_autoload(autoload_interface) -do_autoload(autoload_implements) -object(autoload_implements)#%d (0) { -} -===AutoNA=== -do_autoload(autoload_not_available) -unserializer(autoload_not_available) -Try __autoload() -do_autoload(autoload_not_available) -do_autoload(autoload_not_available) - -Warning: unserialize(): Function unserializer() hasn't defined the class it was called for in %s005.php on line %d -object(__PHP_Incomplete_Class)#1 (1) { - ["__PHP_Incomplete_Class_Name"]=> - string(22) "autoload_not_available" -} -===DONE=== diff --git a/ext/standard/tests/serialize/006.phpt b/ext/standard/tests/serialize/006.phpt deleted file mode 100644 index fb813bc0d9..0000000000 --- a/ext/standard/tests/serialize/006.phpt +++ /dev/null @@ -1,29 +0,0 @@ ---TEST-- -serialize()/unserialize() with exotic letters ---FILE-- -<?php - $åäöÅÄÖ = array('åäöÅÄÖ' => 'åäöÅÄÖ'); - - class ÜberKööliäå - { - public $åäöÅÄÖüÜber = 'åäöÅÄÖ'; - } - - $foo = new Überkööliäå(); - - var_dump(serialize($foo)); - var_dump(unserialize(serialize($foo))); - var_dump(serialize($åäöÅÄÖ)); - var_dump(unserialize(serialize($åäöÅÄÖ))); -?> ---EXPECT-- -string(55) "O:11:"ÜberKööliäå":1:{s:11:"åäöÅÄÖüÜber";s:6:"åäöÅÄÖ";}" -object(ÜberKööliäå)#2 (1) { - ["åäöÅÄÖüÜber"]=> - string(6) "åäöÅÄÖ" -} -string(32) "a:1:{s:6:"åäöÅÄÖ";s:6:"åäöÅÄÖ";}" -array(1) { - ["åäöÅÄÖ"]=> - string(6) "åäöÅÄÖ" -} diff --git a/ext/standard/tests/serialize/autoload_implements.p5c b/ext/standard/tests/serialize/autoload_implements.p5c deleted file mode 100755 index 2c3479c860..0000000000 --- a/ext/standard/tests/serialize/autoload_implements.p5c +++ /dev/null @@ -1,10 +0,0 @@ -<?php - -class autoload_implements implements autoload_interface { - function testFunction() - { - return true; - } -} - -?>
\ No newline at end of file diff --git a/ext/standard/tests/serialize/autoload_interface.p5c b/ext/standard/tests/serialize/autoload_interface.p5c deleted file mode 100755 index 6908155e61..0000000000 --- a/ext/standard/tests/serialize/autoload_interface.p5c +++ /dev/null @@ -1,7 +0,0 @@ -<?php - -interface autoload_interface { - function testFunction(); -} - -?>
\ No newline at end of file diff --git a/ext/standard/tests/serialize/bug14293.phpt b/ext/standard/tests/serialize/bug14293.phpt deleted file mode 100644 index 3fca7e406e..0000000000 --- a/ext/standard/tests/serialize/bug14293.phpt +++ /dev/null @@ -1,36 +0,0 @@ ---TEST-- -Bug #14293 (serialize() and __sleep()) ---FILE-- -<?php -class t -{ - function t() - { - $this->a = 'hello'; - } - - function __sleep() - { - echo "__sleep called\n"; - return array('a','b'); - } -} - -$t = new t(); -$data = serialize($t); -echo "$data\n"; -$t = unserialize($data); -var_dump($t); - -?> ---EXPECTF-- -__sleep called - -Notice: serialize(): "b" returned as member variable from __sleep() but does not exist in %sbug14293.php on line %d -O:1:"t":2:{s:1:"a";s:5:"hello";s:1:"b";N;} -object(t)#%d (2) { - ["a"]=> - string(5) "hello" - ["b"]=> - NULL -} diff --git a/ext/standard/tests/serialize/bug21957.phpt b/ext/standard/tests/serialize/bug21957.phpt deleted file mode 100644 index 29eeb2ee6c..0000000000 --- a/ext/standard/tests/serialize/bug21957.phpt +++ /dev/null @@ -1,49 +0,0 @@ ---TEST-- -Bug #21957 (serialize() mangles objects with __sleep) ---FILE-- -<?php -class test -{ - public $a, $b; - - function test() - { - $this->a = 7; - $this->b = 2; - } - - function __sleep() - { - $this->b = 0; - } -} - -$t['one'] = 'ABC'; -$t['two'] = new test(); - -var_dump($t); - -$s = @serialize($t); -echo $s . "\n"; - -var_dump(unserialize($s)); -?> ---EXPECT-- -array(2) { - ["one"]=> - string(3) "ABC" - ["two"]=> - object(test)#1 (2) { - ["a"]=> - int(7) - ["b"]=> - int(2) - } -} -a:2:{s:3:"one";s:3:"ABC";s:3:"two";N;} -array(2) { - ["one"]=> - string(3) "ABC" - ["two"]=> - NULL -} diff --git a/ext/standard/tests/serialize/bug23298.phpt b/ext/standard/tests/serialize/bug23298.phpt deleted file mode 100644 index a5305cf37c..0000000000 --- a/ext/standard/tests/serialize/bug23298.phpt +++ /dev/null @@ -1,13 +0,0 @@ ---TEST-- -Bug #23298 (serialize() and floats/doubles) ---INI-- -serialize_precision=100 ---FILE-- -<?php - ini_set('precision', 12); - $foo = 1.428571428571428647642857142; - $bar = unserialize(serialize($foo)); - var_dump(($foo === $bar)); -?> ---EXPECT-- -bool(true) diff --git a/ext/standard/tests/serialize/bug24063.phpt b/ext/standard/tests/serialize/bug24063.phpt deleted file mode 100644 index e1cdfecf55..0000000000 --- a/ext/standard/tests/serialize/bug24063.phpt +++ /dev/null @@ -1,23 +0,0 @@ ---TEST-- -Bug #24063 (serialize() missing 0 after the . on scientific notation) ---INI-- -serialize_precision=100 -precision=12 ---FILE-- -<?php -$v = 1; -for ($i = 1; $i < 10; $i++) { - $v /= 10; - echo "{$v} ".unserialize(serialize($v))."\n"; -} -?> ---EXPECT-- -0.1 0.1 -0.01 0.01 -0.001 0.001 -0.0001 0.0001 -1E-05 1E-05 -1E-06 1E-06 -1E-07 1E-07 -1E-08 1E-08 -1E-09 1E-09 diff --git a/ext/standard/tests/serialize/bug25378.phpt b/ext/standard/tests/serialize/bug25378.phpt deleted file mode 100644 index e865b96e99..0000000000 --- a/ext/standard/tests/serialize/bug25378.phpt +++ /dev/null @@ -1,59 +0,0 @@ ---TEST-- -Bug #25378 (unserialize() crashes with invalid data) ---FILE-- -<?php -var_dump(unserialize("s:-1:\"\";")); -var_dump(unserialize("i:823")); -var_dump(unserialize("O:8:\"stdClass :0:{}")); -var_dump(unserialize("O:8:\"stdClass\"+0:{}")); -var_dump(unserialize("O:1000:\"stdClass\":0:{}")); -var_dump(unserialize("a:2:{i:0;s:2:\"12\":")); -var_dump(unserialize("a:2:{i:0;s:2:\"12\";i:1;s:3000:\"123")); -var_dump(unserialize("a:2:{i:0;s:2:\"12\"+i:1;s:3:\"123\";}")); -var_dump(unserialize("a:2:{i:0;s:2:\"12\";i:1;s:3:\"123\";")); -var_dump(unserialize("s:3000:\"123\";")); -var_dump(unserialize("s:3000:\"123")); -var_dump(unserialize("s:3:\"123;")); -var_dump(unserialize("s:0:\"123\";")); -?> -===DONE=== ---EXPECTF-- -Notice: unserialize(): Error at offset 0 of 8 bytes in %sbug25378.php on line %d -bool(false) - -Notice: unserialize(): Error at offset 0 of 5 bytes in %sbug25378.php on line %d -bool(false) - -Notice: unserialize(): Error at offset 13 of 19 bytes in %sbug25378.php on line %d -bool(false) - -Notice: unserialize(): Error at offset 14 of 19 bytes in %sbug25378.php on line %d -bool(false) - -Notice: unserialize(): Error at offset 2 of 22 bytes in %sbug25378.php on line %d -bool(false) - -Notice: unserialize(): Error at offset 17 of 18 bytes in %sbug25378.php on line %d -bool(false) - -Notice: unserialize(): Error at offset 24 of 33 bytes in %sbug25378.php on line %d -bool(false) - -Notice: unserialize(): Error at offset 17 of 33 bytes in %sbug25378.php on line %d -bool(false) - -Notice: unserialize(): Error at offset 33 of 32 bytes in %sbug25378.php on line %d -bool(false) - -Notice: unserialize(): Error at offset 2 of 13 bytes in %sbug25378.php on line %d -bool(false) - -Notice: unserialize(): Error at offset 2 of 11 bytes in %sbug25378.php on line %d -bool(false) - -Notice: unserialize(): Error at offset 8 of 9 bytes in %sbug25378.php on line %d -bool(false) - -Notice: unserialize(): Error at offset 5 of 10 bytes in %sbug25378.php on line %d -bool(false) -===DONE=== diff --git a/ext/standard/tests/serialize/bug26762.phpt b/ext/standard/tests/serialize/bug26762.phpt deleted file mode 100755 index 3011bb602c..0000000000 --- a/ext/standard/tests/serialize/bug26762.phpt +++ /dev/null @@ -1,27 +0,0 @@ ---TEST-- -Bug #26762 (unserialize() produces lowercase classnames) ---SKIPIF-- -<?php - if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); - if (class_exists('autoload_root')) die('skip Autoload test classes exist already'); -?> ---FILE-- -<?php - -ini_set('unserialize_callback_func','check'); - -function check($name) { - var_dump($name); - throw new exception; -} - -try { - @unserialize('O:3:"FOO":0:{}'); -} -catch (Exception $e) { - /* ignore */ -} - -?> ---EXPECTF-- -string(3) "FOO" diff --git a/ext/standard/tests/serialize/bug27469.phpt b/ext/standard/tests/serialize/bug27469.phpt deleted file mode 100644 index e8d14106a8..0000000000 --- a/ext/standard/tests/serialize/bug27469.phpt +++ /dev/null @@ -1,27 +0,0 @@ ---TEST-- -Bug #27469 (serialize() objects of incomplete class) ---FILE-- -<?php -$str = 'O:9:"TestClass":0:{}'; -$obj = unserialize($str); -var_dump($obj); -echo serialize($obj)."\n"; -var_dump($obj); -echo serialize($obj)."\n"; -var_dump($obj); -?> ---EXPECT-- -object(__PHP_Incomplete_Class)#1 (1) { - ["__PHP_Incomplete_Class_Name"]=> - string(9) "TestClass" -} -O:9:"TestClass":0:{} -object(__PHP_Incomplete_Class)#1 (1) { - ["__PHP_Incomplete_Class_Name"]=> - string(9) "TestClass" -} -O:9:"TestClass":0:{} -object(__PHP_Incomplete_Class)#1 (1) { - ["__PHP_Incomplete_Class_Name"]=> - string(9) "TestClass" -} diff --git a/ext/standard/tests/serialize/bug28325.phpt b/ext/standard/tests/serialize/bug28325.phpt deleted file mode 100644 index 7f2bd66371..0000000000 --- a/ext/standard/tests/serialize/bug28325.phpt +++ /dev/null @@ -1,39 +0,0 @@ ---TEST-- -Bug #28325 (Problem in serialisation of circular references) ---FILE-- -<?php -class a { - public $b; -} -class b { - public $c; -} -class c { - public $d; -} -$a = new a(); -$a->b = new b(); -$a->b->c = new c(); -$a->b->c->d = $a; -var_dump(unserialize(serialize($a))); -?> ---EXPECTF-- -object(a)#%d (1) { - ["b"]=> - object(b)#%d (1) { - ["c"]=> - object(c)#%d (1) { - ["d"]=> - object(a)#%d (1) { - ["b"]=> - object(b)#%d (1) { - ["c"]=> - object(c)#%d (1) { - ["d"]=> - *RECURSION* - } - } - } - } - } -} diff --git a/ext/standard/tests/serialize/bug30234.phpt b/ext/standard/tests/serialize/bug30234.phpt deleted file mode 100755 index 9b40cc54b3..0000000000 --- a/ext/standard/tests/serialize/bug30234.phpt +++ /dev/null @@ -1,40 +0,0 @@ ---TEST-- -Bug #30234 (__autoload() not invoked for interfaces) ---SKIPIF-- -<?php - if (class_exists('autoload_root', false)) die('skip Autoload test classes exist already'); -?> ---FILE-- -<?php - -function __autoload($class_name) -{ - require_once(dirname(__FILE__) . '/' . strtolower($class_name) . '.p5c'); - echo __FUNCTION__ . '(' . $class_name . ")\n"; -} - -var_dump(interface_exists('autoload_interface', false)); -var_dump(class_exists('autoload_implements', false)); - -$o = unserialize('O:19:"Autoload_Implements":0:{}'); - -var_dump($o); -var_dump($o instanceof autoload_interface); -unset($o); - -var_dump(interface_exists('autoload_interface', false)); -var_dump(class_exists('autoload_implements', false)); - -?> -===DONE=== ---EXPECTF-- -bool(false) -bool(false) -__autoload(autoload_interface) -__autoload(Autoload_Implements) -object(autoload_implements)#%d (0) { -} -bool(true) -bool(true) -bool(true) -===DONE=== diff --git a/ext/standard/tests/serialize/bug31402.phpt b/ext/standard/tests/serialize/bug31402.phpt deleted file mode 100644 index 9db838d717..0000000000 --- a/ext/standard/tests/serialize/bug31402.phpt +++ /dev/null @@ -1,87 +0,0 @@ ---TEST-- -Bug #31402 (unserialize() generates references when it should not) ---INI-- -error_reporting=E_ALL&~E_STRICT ---FILE-- -<?php - -class TestX { - var $i; - - function __construct($i) { - $this->i = $i; - } -} - -class TestY { - var $A = array(); - var $B; - - function __construct() { - $this->A[1] = new TestX(1); - $this->A[2] = & new TestX(2); - $this->A[3] = & $this->A[2]; - $this->B = $this->A[1]; - } -} - -$before = new TestY(); -$ser = serialize($before); -$after = unserialize($ser); - -var_dump($before, $after); - -?> -===DONE=== ---EXPECTF-- -object(TestY)#%d (2) { - ["A"]=> - array(3) { - [1]=> - object(TestX)#%d (1) { - ["i"]=> - int(1) - } - [2]=> - &object(TestX)#%d (1) { - ["i"]=> - int(2) - } - [3]=> - &object(TestX)#%d (1) { - ["i"]=> - int(2) - } - } - ["B"]=> - object(TestX)#%d (1) { - ["i"]=> - int(1) - } -} -object(TestY)#%d (2) { - ["A"]=> - array(3) { - [1]=> - object(TestX)#%d (1) { - ["i"]=> - int(1) - } - [2]=> - &object(TestX)#%d (1) { - ["i"]=> - int(2) - } - [3]=> - &object(TestX)#%d (1) { - ["i"]=> - int(2) - } - } - ["B"]=> - object(TestX)#%d (1) { - ["i"]=> - int(1) - } -} -===DONE=== diff --git a/ext/standard/tests/serialize/bug31442.phpt b/ext/standard/tests/serialize/bug31442.phpt deleted file mode 100755 index 3497b278cb..0000000000 --- a/ext/standard/tests/serialize/bug31442.phpt +++ /dev/null @@ -1,8 +0,0 @@ ---TEST-- -Bug #31442 (unserialize broken on 64-bit systems) ---FILE-- -<?php -echo unserialize(serialize(2147483648)); -?> ---EXPECT-- -2147483648 diff --git a/ext/standard/tests/serialize/bug37947.phpt b/ext/standard/tests/serialize/bug37947.phpt deleted file mode 100755 index 07371d1a3f..0000000000 --- a/ext/standard/tests/serialize/bug37947.phpt +++ /dev/null @@ -1,21 +0,0 @@ ---TEST-- -Bug #37947 (zend_ptr_stack reallocation problem) ---INI-- -error_reporting=0 ---FILE-- -<?php -class test { - function extend_zend_ptr_stack($count,$a,$b,$c,$d,$e) { - if ($count>0) $this->extend_zend_ptr_stack($count - -1,$a,$b,$c,$d,$e); - } - - function __wakeup() { - $this->extend_zend_ptr_stack(10,'a','b','c','d','e'); - } -} - -$str='a:2:{i:0;O:4:"test":0:{}junk'; -var_dump(unserialize($str)); ---EXPECT-- -bool(false) |