为什么php往mongo里插入整型数字8,变成了numberint(8) 解决方案:可以先对数据进行转换,转换完后再插入到数据库 例如: $spec = array( 'name' => '张三', 'state' => new MongoInt32(100) )