Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

--TEST-- Bug #76074 (opcache corrupts variable in for-loop) --EXTENSIONS-- opcache --FILE-..

Decoded Output download

--TEST--
Bug #76074 (opcache corrupts variable in for-loop)
--EXTENSIONS--
opcache
--FILE--
<?php

function test(int $nr) {
    for ($i = $nr; $i <= $nr + 1; $i++)
        var_dump($i);
}

test(1);

?>
--EXPECT--
int(1)
int(2)

Did this file decode correctly?

Original Code

--TEST--
Bug #76074 (opcache corrupts variable in for-loop)
--EXTENSIONS--
opcache
--FILE--
<?php

function test(int $nr) {
    for ($i = $nr; $i <= $nr + 1; $i++)
        var_dump($i);
}

test(1);

?>
--EXPECT--
int(1)
int(2)

Function Calls

test 1
var_dump 1

Variables

$i 1
$nr 1

Stats

MD5 fe2d038b8627c1ab8fb0615bd8ba6af5
Eval Count 0
Decode Time 79 ms