mirror of
https://github.com/php/php-src.git
synced 2024-09-22 18:37:25 +00:00
75bc3446f8
All these tests are meant to run with OPcache available, and some will even fail inevitably without it, so we add OPcache as SKIPIF requirement.
23 lines
257 B
PHP
23 lines
257 B
PHP
--TEST--
|
|
Incorrect optimization of $i = $i++
|
|
--SKIPIF--
|
|
<?php require_once('skipif.inc'); ?>
|
|
--FILE--
|
|
<?php
|
|
|
|
function test() {
|
|
$i = 1;
|
|
$i = $i++;
|
|
var_dump($i);
|
|
|
|
$i = 1;
|
|
$i = $i--;
|
|
var_dump($i);
|
|
}
|
|
test();
|
|
|
|
?>
|
|
--EXPECT--
|
|
int(1)
|
|
int(1)
|