<?php

/*
 * These are ok.
 */
$i = 10;
--$i;
-- $i ?> <?php
-- /*comment*/ $i;
    ++$i;
    ++
    $i ?> <?php
    ++/*comment*/$i;

if (true) {
    ++ClassName::$v;
--\Fully\Qualified\ClassName::$v ?> <?php
    ++namespace\ClassName::$v;
}

++self::$v;--self::$v;

--$a[0];

++$obj->prop ?> <?php
--$obj->prop;

/*
 * These should throw errors.
 */
$i--;
$i        -- ?> <?php
$i /*comment*/ --;
    $i++;
    $i ++;
    $i /*comment*/ ++;

$a[0]--;

if (true) {
    ClassName::$v++;
\Fully\Qualified\ClassName::$v-- ?> <?php
    namespace\ClassName::$v++;
}

self::$v++;self::$v--;

           $obj->prop ++ ?> <?php
/*comment*/ $obj-> /*comment*/ prop --;

$obj->prop[$value[2]]++;
$var['key' . ($i + 10) . 'key']--;

/*
 * Report on, but don't auto-fix, statements with multiple in/decrementers.
 */
++$i--;
++ -- $i ++ ++ ?> <?php

/*
 * Don't touch non-stand-alone statements.
 */
while ($i++ && $i < 10);

for ($i = 0; $i < 10; $i++) {}

function_call($i--, $j++) ?> <?php

$a = 10 + $i++ - 5;

return $a['key'][$i++];

// Intentional parse error. Nullsafe operator not allowed in write-context. Ignore.
$obj?->prop++;

// Intentional parse error.
++;
