<?php function test($obj) { $obj->fputcsv([]); } $objects = [ new SplFileObject(tempnam(sys_get_temp_dir(), 'tmp')), (new ReflectionClass( "SplFileObject" ))->newInstanceWithoutConstructor(), ]; foreach ($objects as $obj) { test($obj); }
You have javascript disabled. You will not be able to edit any code.