3v4l.org

run code in 200+ PHP versions simultaneously
<?php class Pipeline{ public static function make_pipeline($func){ return function($args) use ($func){ return $func($args); }; } } $c = new Pipeline(); $fun = $c::make_pipeline(function($x){ return $x*3; }); echo $fun(3); // should print 9
Output for 7.1.25 - 7.3.0
9