TypePHP 编译器
https://swoole.com/aot/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
813 B
28 lines
813 B
--TEST--
|
|
Inc/dec on bool: warning converted to exception
|
|
--FILE--
|
|
<?php
|
|
|
|
$values = [false, true];
|
|
foreach ($values as $value) {
|
|
try {
|
|
$value++;
|
|
} catch (\Exception $e) {
|
|
echo $e->getMessage(), PHP_EOL;
|
|
}
|
|
try {
|
|
$value--;
|
|
} catch (\Exception $e) {
|
|
echo $e->getMessage(), PHP_EOL;
|
|
}
|
|
}
|
|
?>
|
|
--EXPECTF--
|
|
Warning: Increment on type bool has no effect, this will change in the next major version of PHP in %s on line %d
|
|
|
|
Warning: Decrement on type bool has no effect, this will change in the next major version of PHP in %s on line %d
|
|
|
|
Warning: Increment on type bool has no effect, this will change in the next major version of PHP in %s on line %d
|
|
|
|
Warning: Decrement on type bool has no effect, this will change in the next major version of PHP in %s on line %d
|
|
|
|
|