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 ');
Output for git.master, git.master_jit
Fatal error: Uncaught TypeError: trim(): Argument #2 ($characters) must be of type string, array given in /in/8kku6:15 Stack trace: #0 /in/8kku6(15): trim(' some data ', Array) #1 /in/8kku6(21): SkipCallableParamAssignFluentMultiParams->run(' some data ') #2 {main} thrown in /in/8kku6 on line 15
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
28.58 ms | 405 KiB | 5 Q