---
title: "Feature: #98016 - PSR-14 EvaluateModifierFunctionEvent"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:feature-98016-1658732423"
source: "Changelog/12.0/Feature-98016-PSR-14EvaluateModifierFunctionEvent.rst"
typo3-version: "12.0"
typo3-major: 12
type: "feature"
issue: 98016
forge: "https://forge.typo3.org/issues/98016"
tags: ["PHP-API", "TSConfig", "TypoScript", "ext:core"]
rendered: "2026-09-25T23:17:45+00:00"
---

# Feature: #98016 - PSR-14 EvaluateModifierFunctionEvent {#feature-98016-1658732423}

See [forge#98016](https://forge.typo3.org/issues/98016)

## Description {#description}

A new PSR-14 event `\TYPO3\CMS\Core\TypoScript\AST\Event\EvaluateModifierFunctionEvent`
has been introduced which allows own TypoScript functions using the `:=` operator.

This is a substitution of the old
`$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tsparser.php']['preParseFunc']`
hook as described in [this Changelog](https://docs.typo3.org/permalink/changelog:breaking-98016-1658731955).

## Impact {#impact}

The TYPO3 Core tests come with test extension
`EXT:core/Tests/Functional/Fixtures/Extensions/test_typoscript_ast_function_event` to functional
test the new event. The extension implements an example listener that can be used as boilerplate.

A simple TypoScript example looks like this:

```typoscript
someIdentifier = originalValue
someIdentifier := myModifierFunction(myFunctionArgument)
```

To implement `myModifierFunction`, an extension needs to register an event listener
in file `Configuration/Services.yaml`:

```yaml
MyVendor\MyPackage\EventListener\MyTypoScriptModifierFunction:
tags:
  - name: event.listener
    identifier: 'my-package/typoscript/evaluate-modifier-function'
```

The corresponding event listener class could look like this:

```php
use TYPO3\CMS\Core\TypoScript\AST\Event\EvaluateModifierFunctionEvent;

final class MyTypoScriptModifierFunction
{
    public function __invoke(EvaluateModifierFunctionEvent $event): void
    {
        if ($event->getFunctionName() === 'myModifierFunction') {
            $originalValue = $event->getOriginalValue();
            $functionArgument = $event->getFunctionArgument();
            // Manipulate values and set new value
            $event->setValue($originalValue . ' example ' . $functionArgument);
        }
    }
}
```
