~ubuntu-branches/ubuntu/hardy/php5/hardy-updates

« back to all changes in this revision

Viewing changes to ext/standard/tests/serialize/bug26762.phpt

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-10-09 03:14:32 UTC
  • Revision ID: james.westby@ubuntu.com-20051009031432-kspik3lobxstafv9
Tags: upstream-5.0.5
ImportĀ upstreamĀ versionĀ 5.0.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--TEST--
 
2
Bug #26762 (unserialize() produces lowercase classnames)
 
3
--SKIPIF--
 
4
<?php 
 
5
        if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); 
 
6
        if (class_exists('autoload_root')) die('skip Autoload test classes exist already');
 
7
?>
 
8
--FILE--
 
9
<?php 
 
10
 
 
11
ini_set('unserialize_callback_func','check');
 
12
 
 
13
function check($name) {
 
14
        var_dump($name);
 
15
        throw new exception;
 
16
}
 
17
 
 
18
try {
 
19
        @unserialize('O:3:"FOO":0:{}');
 
20
}
 
21
catch (Exception $e) {
 
22
        /* ignore */
 
23
}
 
24
 
 
25
?>
 
26
--EXPECTF--
 
27
string(3) "FOO"