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