--TEST-- Test function readgzfile() by substituting argument 2 with object values. --SKIPIF-- --FILE-- new classWithToString(), 'instance of classWithoutToString' => new classWithoutToString(), ); foreach ( $variation as $var ) { var_dump(readgzfile( $filename, $var ) ); } ?> ===DONE=== --EXPECTF-- Error: 2 - readgzfile() expects parameter 2 to be integer, object given, %s(%d) NULL Error: 2 - readgzfile() expects parameter 2 to be integer, object given, %s(%d) NULL ===DONE===