updating to php7 an older directory script needs to be modified, because of getting ""the each() function is deprecated"". In the following code I tried to replace each into foreach, but I didn't succeed:
    case 'php':
        list (,$php_block) = each($this->_php_blocks);
        $this->_linenum += substr_count($php_block, "\n");
        $php_extract = '';
        if($this->php_extract_vars)
        {
            if (strnatcmp(PHP_VERSION, '4.3.0') >= 0)
            {
                $php_extract = '<?php extract($this->_vars, EXTR_REFS); ?>' . "\n";
            }
            else
            {
                $php_extract = '<?php extract($this->_vars); ?>' . "\n";
            }
        }
        return $php_extract . '<?php '.$php_block.' ?>';
        break;
In the second line I tried
list (,$php_block) = foreach($this as '_php_blocks');
would be great to get some hint thx ARS
