diff --git a/src/Php/TalesInternal.php b/src/Php/TalesInternal.php index 307e4b02..9f126024 100644 --- a/src/Php/TalesInternal.php +++ b/src/Php/TalesInternal.php @@ -455,9 +455,11 @@ public static function php(string $src): string throw new PhpNotAllowedException('The php modifier has been disabled, you must not use it.'); } - static::checkTokens($src); + $transformed = Transformer::transform($src, '$ctx->'); - return Transformer::transform($src, '$ctx->'); + static::checkTokens($transformed); + + return $transformed; } /**