1--TEST--
2Error handler can change type of operand of ++
3--FILE--
4<?php
5
6set_error_handler(function () {
7    global $x;
8    $x = 1;
9});
10
11$x = '';
12$x++;
13var_dump($x);
14
15set_error_handler(function ($errno, $errstr) {
16    var_dump($errstr);
17    global $x;
18    $x = new stdClass;
19});
20
21$x = 'foo!';
22$x++;
23var_dump($x);
24
25/* Interned string */
26$x = '!';
27$x++;
28var_dump($x);
29
30?>
31DONE
32--EXPECT--
33string(1) "1"
34string(50) "Increment on non-alphanumeric string is deprecated"
35string(4) "foo!"
36string(50) "Increment on non-alphanumeric string is deprecated"
37string(1) "!"
38DONE
39