summaryrefslogtreecommitdiff
path: root/Zend/tests/call_to_deprecated_function_args.phpt
blob: 5c3eb9ae1610398526ce68f0c4b604af726df81e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
--TEST--
Check that arguments are freed when calling a deprecated function
--FILE--
<?php

set_error_handler(function($code, $msg) {
    throw new Error($msg);
});

try {
    ezmlm_hash(new stdClass);
} catch (Error $e) {
    echo $e->getMessage(), "\n";
}

$ret = new stdClass;
try {
    $ret = ezmlm_hash(new stdClass);
} catch (Error $e) {
    echo $e->getMessage(), "\n";
}

try {
    $fn = 'ezmlm_hash';
    $fn(new stdClass);
} catch (Error $e) {
    echo $e->getMessage(), "\n";
}

$ret = new stdClass;
try {
    $fn = 'ezmlm_hash';
    $ret = $fn(new stdClass);
} catch (Error $e) {
    echo $e->getMessage(), "\n";
}

?>
--EXPECT--
Function ezmlm_hash() is deprecated
Function ezmlm_hash() is deprecated
Function ezmlm_hash() is deprecated
Function ezmlm_hash() is deprecated