Giter Club home page Giter Club logo

Comments (7)

twose avatar twose commented on July 28, 2024

@gouchaoer
可能因为一些问题, swoole2.x一度移除了PHP7.0支持, 现在swoole4.0是绝对稳定, 可以在任意场景使用协程(之前不能使用魔术方法等), 所以最近会抽时间更新这个lib, 发正式版.

from saber.

shuyabin avatar shuyabin commented on July 28, 2024
  • -为啥我的php 7.0 报错...这就有点尴尬...
    image
    image

from saber.

twose avatar twose commented on July 28, 2024

@shuyabin
看了一下, 还真是, PHP71才支持null的类型声明, 这个库全都是用最新写法的, 既然用swoole了, 最好还是持续拥抱最新版本吧

PHP 7.1 allows for void and null return types by preceding the type declaration with a ?

那么最低版本还是得PHP71了, 如果说5 => 7有历史困难, 70 => 71 其实并不存在这种问题.

from saber.

gouchaoer avatar gouchaoer commented on July 28, 2024

依赖swoole的话,和swoole/swoft之类的保持一致从70开始是不是更好一点,因为是基础组件,那几个返回值地方感觉不用影响不大

from saber.

twose avatar twose commented on July 28, 2024

最近发现swoole在PHP7.0下有部分测试跑不通, 70底层还是有点问题的, 说不定会踩雷...
结合swoole的一些小bug(最近才修的), 甚至可能需要搭配swoole4.0.3才能发挥100%威力(比如连接池等)
讲道理感觉现在71占有比会高一些? 推荐还是71及以上比较省心, 兼容的话有时间清理一下返回值(不支持?的话返回值类型提示也不能带, 不然返回null会报错)

from saber.

xuhuaiqu avatar xuhuaiqu commented on July 28, 2024

公司版本升级到7.1 也需要不少人配合才行 虽然眼馋saber目前看来无法支持7.0啊

from saber.

twose avatar twose commented on July 28, 2024

7.0已被PHP官方废弃, Swoole也即将移除PHP7.0的支持

from saber.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.