summaryrefslogtreecommitdiff
path: root/Zend/tests/non_well_formed_param_exception.phpt
blob: d688375f9f352e23281035e3a98724f97c0ca540 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--TEST--
A "non well formed" notice converted to exception should result in a ZPP failure
--FILE--
<?php

set_error_handler(function($_, $msg) {
    throw new Exception($msg);
}, E_NOTICE);

try {
    wordwrap("foo", "123foo", "");
} catch (Exception $e) {
    echo $e, "\n";
}

?>
--EXPECTF--
Exception: A non well formed numeric value encountered in %s:%d
Stack trace:
#0 [internal function]: {closure}(%s)
#1 %s(%d): wordwrap('foo', '123foo', '')
#2 {main}