3v4l.org

run code in 300+ PHP versions simultaneously
<?php class SkipCallableParamAssignFluentMultiParams { private $transform; public function withTransform(callable $callable) { $this->transform = $callable; return $this; } public function run($value, $optionalData = []) { var_dump(($this->transform)($value, $optionalData)); } } (new SkipCallableParamAssignFluentMultiParams()) ->withTransform(trim(...)) ->run(' some data ');

preferences:
34.08 ms | 405 KiB | 5 Q