PHP  
 PHP_5_5
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Test Failure Report for ext/standard/tests/serialize/006.phpt ('serialize()/unserialize() with exotic letters')

Script

1: <?php
2:     $ 
= array('' => '');
3:
4:     class 
berKli 
5:     
{
6:         public 
$ber '';
7:     }
8:   
9:     
$foo = new berkli();
10:   
11:     
var_dump(serialize($foo));
12:     
var_dump(unserialize(serialize($foo)));
13:     
var_dump(serialize($));
14:     
var_dump(unserialize(serialize($)));
15:
?>
16:

Expected

string(55) "O:11:"berKli":1:{s:11:"ber";s:6:"";}"
object(berKli)#2 (1) {
  ["ber"]=>
  string(6) ""
}
string(32) "a:1:{s:6:"";s:6:"";}"
array(1) {
  [""]=>
  string(6) ""
}

Output

string(55) "O:11:"berKli":1:{s:11:"ber";s:6:"";}"

Notice: unserialize(): Error at offset 6 of 55 bytes in /var/php_gcov/PHP_5_5/ext/standard/tests/serialize/006.php on line 12
bool(false)
string(32) "a:1:{s:6:"";s:6:"";}"
array(1) {
  [""]=>
  string(6) ""
}

Diff

002+ 
003+ Notice: unserialize(): Error at offset 6 of 55 bytes in /var/php_gcov/PHP_5_5/ext/standard/tests/serialize/006.php on line 12
004+ bool(false)
002- object(berKli)#2 (1) {
003-   ["ber"]=>
004-   string(6) ""
005- }

 

Generated at Sun, 26 Oct 2014 06:24:57 +0000 (5 days ago)

Copyright © 2005-2014 The PHP Group
All rights reserved.