<?php class Model {}; function select(string $key, string ...$keys): Model { \array_unshift($keys, $key); foreach ($keys as &$key) { $key = \preg_replace_callback('/([a-zA-Z]+)\((.*)\)/', function ($match) { return \sprintf('%s(%s)', $match[1], "foo"); }, $key); } return new Model; } select("x", 'a', 'b', 'c');
You have javascript disabled. You will not be able to edit any code.