summaryrefslogtreecommitdiff
path: root/Zend/tests/php_errormsg_misoptimization.phpt
blob: c121c1021acff2ac53360cc3565f0b847e102e6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--TEST--
The variable $php_errormsg shouldn't be optimized as it may be unpredictably modified
--INI--
track_errors=1
--FILE--
<?php

function test() {
    $php_errormsg = 1;
    echo $undef;
    var_dump($php_errormsg + 1);
}
test();

?>
--EXPECTF--
Notice: Undefined variable: undef in %s on line %d

Warning: A non-numeric value encountered in %s on line %d
int(1)