💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
## Table->create 创建内存表。 ~~~ function Table->create() : bool; ~~~ * 定义好表的结构后,执行`create`向操作系统申请内存,创建表 * 调用`create`之前不能使用`set`、`get`等数据读写操作方法 * 调用`create`之后不能使用`column`方法添加新字段 * 系统内存不足,申请失败,`create`返回`false` * 申请内存成功,`create`返回`true` <br> > Table使用共享内存来保存数据,在创建子进程前,务必要执行Table->create() > Server中使用Table,Table->create()必须在Server->start()前执行 <br> ~~~ $table = new Swoole\Table(1024); $table->column('id', swoole_table::TYPE_INT, 4); //1,2,4,8 $table->column('name', swoole_table::TYPE_STRING, 64); $table->column('num', swoole_table::TYPE_FLOAT); $table->create(); $worker = new Swoole\Process('child1', false, false); $worker->start(); ~~~