php-src/Zend/tests/object_property_ref_incdec.phpt
2014-05-26 18:13:16 +02:00

20 lines
236 B
PHP

--TEST--
Inc/dec of reference object properties
--FILE--
<?php
$obj = new stdClass;
$obj->cursor = 0;
$ref =& $obj->cursor;
$obj->cursor++;
var_dump($obj->cursor);
$obj->cursor--;
var_dump($obj->cursor);
?>
--EXPECT--
int(1)
int(0)