php网站功能块学习_学习PHP 7,了解新功能等

news/2024/5/20 4:35:32/文章来源:https://blog.csdn.net/culi3118/article/details/108374137

php网站功能块学习

PHP 7, the next version of the world’s most popular programming language, has been released. We’d love to shoot fireworks and get drunk with our newfound power (seriously, the language is in the true big leagues now, functionality and performance-wise) but we’re sure the rest of the internet will do this for us. Instead, we’ll focus on compiling a (perpetually up to date) list of resources to get started with version 7 – posts describing what’s new, books helping you kick things off, and more. Let’s get to it!

PHP 7,世界上最流行的编程语言的下一个版本,已经发布。 我们很想射击烟花,并以我们新发现的力量为自己喝醉(说真的,这种语言已成为真正的大联盟,无论是功能还是性能方面 ),但是我们确信互联网的其余部分将为我们做到这一点。 取而代之的是,我们将专注于编译(永久更新)的资源列表以开始使用版本7 –描述新功能的帖子,可帮助您开始工作的书籍等等。 让我们开始吧!

alt

PHP 6发生了什么? (What Happened to PHP 6?)

When told the next major version is 7 while we’ve been developing on 5+ so far, many wonder what happened to version 6. It’s a long story, so to avoid looking confused when this is brought up, here are some interesting discussions and posts as required reading:

当到目前为止,我们已经在5+上进行开发时,当告诉下一个主要版本是7时,很多人都想知道版本6发生了什么。这是一个很长的故事,因此,为避免混淆,在此进行了一些有趣的讨论,根据需要发布的文章:

  • https://philsturgeon.uk/php/2014/07/23/neverending-muppet-debate-of-php-6-v-php-7/

    https://philsturgeon.uk/php/2014/07/23/neverending-muppet-debate-of-php-6-v-php-7/

  • https://wiki.php.net/rfc/php6

    https://wiki.php.net/rfc/php6

  • https://news.ycombinator.com/item?id=8786919

    https://news.ycombinator.com/item?id=8786919

In short, the unicode problems that were supposed to be solved in version 6 ultimately failed, with too many added complications, and this kind of ruined things for everyone. It was decided that version 6’s rep was too damaged to keep it alive, and a move to PHP 7 was made.

简而言之,原本应该在版本6中解决的unicode问题最终失败了,并增加了太多的复杂性,并且这种破坏了所有人的生活。 决定版本6的rep太损坏以致无法继续运行,因此转向了PHP 7。

新功能 (New Features)

We’ve spoken about the new features briefly before, but here’s a more comprehensive list of links to information about them – now’s the time to dive in and get ready.

之前 ,我们已经简要介绍了这些新功能,但是这里有更全面的链接,其中包含有关这些功能的信息-现在是您深入研究并做好准备的时候了。

To learn about what’s coming and what an impact it might have on you:

要了解即将发生的事情及其对您的影响,请执行以下操作:

  • Official list of new features

    官方新功能列表

  • Super comprehensive list on Github

    Github上的超级综合列表

  • What to Expect series

    期待什么系列

  • PHP7 at a glance

    PHP7概览

  • DigitalOcean’s look at new features

    DigitalOcean看新功能

  • Colin O’dell’s 5 Lesser Known Features, just one in a set of several very useful PHP 7 posts of his

    Colin O'dell的5个鲜为人知的功能 ,仅是他的几篇非常有用的PHP 7帖子集中的一个

If you’re into video lessons and don’t mind paying for them, two sites covered basically the same thing:

如果您正在学习视频课程而又不介意付费,那么两个站点基本上都包含相同的内容:

  • Codecourse at https://www.codecourse.com/library/lessons/php-7-new-features

    https://www.codecourse.com/library/lessons/php-7-new-features上的代码课程

  • Laracasts at https://laracasts.com/series/php7-up-and-running

    网址为https://laracasts.com/series/php7-up-and-running的 Laracasts

To learn about the type system, arguably the biggest change, and how it compares to hack:

要了解类型系统(可以说是最大的变化)以及它与hack的比较方式:

  • http://www.dmiller.io/blog/2015/4/26/comparing-the-php7-and-hack-type-systems

    http://www.dmiller.io/blog/2015/4/26/comparing-the-php7-and-hack-type-systems

  • https://medium.com/the-white-hat-elephpant/php7-more-strict-but-only-if-you-want-it-to-be-78d6690f2090

    https://medium.com/the-white-hat-elephpant/php7-more-strict-but-only-if-you-want-it-to-be-78d6690f2090

PHP 7入门 (Getting Started with PHP 7)

  • If you’re not of the VM sort, to install PHP 7 on the most recent version of OS X, see http://php-osx.liip.ch/

    如果您不属于VM,则要在最新版本的OS X上安装PHP 7,请参见http://php-osx.liip.ch/

  • If you are, however, there’s Jump Start PHP Environment – a book by yours truly, edited and reviewed by the venerable Ross Tuck. It’s a short book on getting started before code – learning about requests, responses, virtual machines, and all the other important server and local development machine setups. The book helps prepare you to write platform-agnostic code, and makes it possible for others to just jump into your team at a whim.

    但是,如果您是,请参阅Jump Start PHP Environment ,这是由您本人真正撰写,由古老的Ross Tuck编辑和审查的书。 这是一本关于代码之前入门的简短书–了解请求,响应,虚拟机以及所有其他重要的服务器和本地开发计算机设置。 这本书有助于您准备编写与平台无关的代码,并使其他人可以随心所欲地跳入您的团队。

  • Paid intro course from Zend – good for people familiar with PHP 5 who don’t mind shelling out some cash

    Zend的付费入门课程 –对熟悉PHP 5且不介意花一些钱的人来说非常有用

  • Official migration guide from 5.x

    从5.x开始的官方迁移指南

  • Erika’s excellent post on DigitalOcean

    Erika在DigitalOcean上的精彩文章

Various compatibility checkers and converters are available:

提供各种兼容性检查器和转换器:

  • PHP7MAR (Migration Assistant Report) will report any inconsistencies between your current code base and PHP 7, so you can plan and budget your upgrade path

    PHP7MAR (迁移助手报告)将报告当前代码库和PHP 7之间的任何不一致之处,因此您可以计划和预算升级路径

  • php7ize is a code fixer that tries to add PHP 7 features into a PHP 5 codebase automatically

    php7ize是一个代码修复程序,试图将PHP 7功能自动添加到PHP 5代码库中

  • php7cc (Compatibility Checker) will try and do the same things as the MAR above – compare their outputs for the most reliable results.

    php7cc (兼容性检查器)将尝试与上述MAR进行相同的操作-比较其输出以获得最可靠的结果。

It should be noted that none of the tools above are a replacement for a good test suite – the only way to be 100% certain there’s no bugs left behind is to cover your code with tests so it can be easily inspected and verified during migration.

应该注意的是,以上工具都不是好的测试套件的替代品–唯一可以百分百确定没有遗留任何错误的方法是用测试覆盖代码,以便在迁移过程中轻松检查和验证代码。

Last but not least, PHPToday have put together an absolutely fantastic list of talks which you can take a look at here.

最后但并非最不重要的一点是,PHPToday汇集了绝对精彩的演讲清单,您可以在此处查看 。

工具,测试和托管 (Tools, testing and hosting)

Lots of helpful tools have already sprung up around the new release:

新版本中涌现出许多有用的工具:

  • PhpStorm, ahead of the pack as ever, already comes with full PHP 7 mode.

    PhpStorm ,比以往任何时候都领先,已经带有完整PHP 7模式。

  • Phan is a static analyzer, the features of which you’d best read about here. We’ve got a full tutorial coming up, for the curious.

    Phan是静态分析仪,您最好在这里阅读其功能。 出于好奇,我们准备了完整的教程。

  • Exakat is another analyzer

    Exakat是另一种分析仪

  • Tuli is yet another – but development is somewhat halted. If anyone wants to write a comparison post targeting all three, let us know!

    图里(Tuli )又是另一个-但发展有些停滞。 如果有人想针对这三个方面撰写比较文章,请告诉我们!

  • Andrea Faulds threw out some interesting PHP 7 exclusive packages that warrant a look!

    Andrea Faulds抛出了一些有趣的PHP 7独家软件包 ,值得一看!

  • A Vagrant box by Rasmus Lerdorf is the box to use when testing on multiple versions of PHP, and can be downloaded here. Tutorial about using it here.

    Rasmus Lerdorf的Vagrant box是在多个PHP版本上进行测试时要使用 box,可以在此处下载。 有关在此处使用它的教程。

  • Travis CI has supported PHP 7 for a while now. Setting a project up to be 7-tested is easy, just make your .travis.yml file look something like this:

    Travis CI已经支持PHP 7一段时间了。 将项目设置为经过7个测试很容易,只需使.travis.yml文件看起来像这样:

    language: php
    php:
    - 5.6
    - 7.0
    - hhvm
    # This triggers builds to run on the new TravisCI infrastructure.
    # See: http://docs.travis-ci.com/user/workers/container-based-infrastructure/
    sudo: false
    matrix:
    allow_failures:
    - php: 7.0
    before_script:
    - travis_retry composer self-update
    - travis_retry composer install --no-interaction --prefer-source
    script:
    - phpunit --coverage-text --coverage-clover=coverage.clover
    after_script:
    - if [[ $TRAVIS_PHP_VERSION != 'hhvm' && $TRAVIS_PHP_VERSION != '7.0' ]]; then php vendor/bin/ocular code-coverage:upload --format=php-clover coverage.clover; fi

    The above was inspired by the PhpLeague skeleton – a PHP 7 ready skeleton package, so if you’re starting a new one, that’s where to look for a baseline.

    上面的内容受PhpLeague框架的启发–一个PHP 7框架框架,因此,如果您要启动一个新的 ,则可以在这里寻找基线。

  • Right now, the hosting space is rather sparse for PHP 7, but keep an eye on http://phpversions.info/php-7/ – the list will be updated as new information rolls in.

    目前,PHP 7的托管空间相对较少,但请留意http://phpversions.info/php-7/-该列表将随着新信息的发布而更新。

(Miscellaneous)

For resources on developing extensions for PHP 7 (things are bit different with the extension API), http://gophp7.org/gophp7-ext/ is still the go-to site.

有关开发PHP 7扩展的资源(扩展API的功能有些不同), http://gophp7.org/gophp7-ext/仍是首选站点。

To join communities and discuss things or seek help, some of the following may be of help, in order of popularity:

要加入社区并讨论事物或寻求帮助,按照普及程度的不同,以下某些方面可能会有帮助:

  • On IRC, the ##php group on freenode will be of use

    在IRC上,将使用freenode上的## php组
  • For those in favor of a more static medium, the PHP subreddit can be a place of knowledge, but also a minefield. Tread carefully.

    对于那些赞成使用更静态的媒体的人来说, PHP subreddit可以是一个知识的地方,而且可以是一个雷区。 小心踩一下。

  • If you’re not of the IRC or Reddit kind, but like live discussion nonetheless, there’s the PHP Slack Channel and the StackOverflow PHP chat room

    如果您不是IRC或Reddit类型的人,但是仍然像现场讨论一样,这里有PHP Slack Channel和StackOverflow PHP聊天室

  • To join a user group for some offline hanging out, check out http://php.ug/

    要加入用户组进行一些离线环聊,请访问http://php.ug/

结论 (Conclusion)

Got more resources to share? Let us know! Paid or not, we’ll look at everything you throw at us and potentially include it.

有更多资源可以分享? 让我们知道! 不论是否付费,我们都会查看您扔给我们的所有内容,并可能将其包括在内。

With PHP 7 out, do you intend to convert your apps/packages any time soon? If not, why? Let us know your thoughts and feelings below! And don’t forget – the new version wouldn’t have been possible without the hard work of all the core contributors. They may not always all see eye to eye, but when they pool their resources and run towards a common goal, the sky’s the limit. Here’s to you, champs, thanks for keeping the web epic!

随着PHP 7的发布,您打算尽快转换您的应用程序/软件包吗? 如果没有,为什么? 让我们在下面知道您的想法和感受! 而且请不要忘记-如果没有所有核心贡献者的辛勤工作,就不可能有新版本。 他们可能并不总是一见倾心,但是当他们集中资源并朝着一个共同的目标迈进时,天空就是极限。 冠军,这是给您的, 感谢您保持网络史诗!

翻译自: https://www.sitepoint.com/learn-php-7-find-out-whats-new-and-more/

php网站功能块学习

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.luyixian.cn/news_show_785168.aspx

如若内容造成侵权/违法违规/事实不符,请联系dt猫网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

wordpress网站迁移_如何将您的WordPress网站迁移到新的托管服务提供商

wordpress网站迁移This article is part of a series created in partnership with SiteGround. Thank you for supporting the partners who make SitePoint possible. 本文是与SiteGround合作创建的系列文章的一部分。 感谢您支持使SitePoint成为可能的合作伙伴。 We’ve be…

wordpress 静态化_地理定位WordPress内容以个性化您的网站

wordpress 静态化So what does that phrase mean, “Geo-Targeting WordPress Content”? First, let’s back up and look at an example of personalization. 那么,这句话是什么意思,“以地理定位的WordPress内容”? 首先,让我…

next主题seo优化_SEO可见性的5个最佳WordPress主题

next主题seo优化This article is part of a series created in partnership with SiteGround. Thank you for supporting the partners who make SitePoint possible. 本文是与SiteGround合作创建的系列文章的一部分。 感谢您支持使SitePoint成为可能的合作伙伴。 Theme selec…

cloudflare_使用Cloudflare使您的网站更快,更安全

cloudflareCloudflare is an industry leader in the content-delivery space, reducing load and speeding up millions of websites. Cloudflare是内容交付领域的行业领导者,可减轻负载并加快数百万个网站的速度。 What is peculiar about this provider is that…

六个最受欢迎的 CMS 建站系统,不容错过|Gitee项目推荐

CMS 是 Content Management System 的缩写,意为"内容管理系统"。 内容管理系统是企业信息化建设和电子政务的新宠,也是一个相对较新的市场。对于内容管理,业界还没有一个统一的定义,不同的机构有不同的理解。CMS 在各行…

html 相对路径 网站根目录,html中的绝对路径URL和相对路径URL及子目录、父目录、根目录...

绝对URL用于表示Internet中特定文件所需要的全部内容,Internet中的每一个文件都有一个唯一的URL,这就是在网页中搜索时需要输入到地址栏的连接。例如,要进入百度一下的网页,则在网页地址栏中输入:即可。一旦进入到某个…

php网站整合ck播放器,网页视频播放器-ckplayer 整合到wordpress

在这里我将教大家怎样将这款播放器整合到wordpress中来,并教大家怎么将优酷视频用到这款播放器上面!第一步:我们要下载一个播放器文件第二步:将下载文件解压出来,打开里面player文件夹下ckplayer.txt文本文档,将里面的…

【最新】某素材网站上的虎年高质量海报素材合集,附带源文件和预览图

原格式PSD提供给大家同时提供jpg预览图,马上过年了,这套素材用的上,红色喜庆 醉了,本来想整理的上传的,但是发现有水印,现在水印已经全部去除,放心食用,每个图都比较大,一…

使用SSM重新开发计科院网站

一、游览 在游览器地址栏输入:http://localhost:8080/index,即访问计科院首页,由于前期对数据库以及JavaBean的设计考虑不够充分,导致后期的代码臃肿,所以项目启动时对首页进行数据的填充难以实现,必须输入…

airpods固件更新方法_AirPods Pro 固件更新,空间音频来了丨 网站证书更新

09/15 网站证书更新 证书已上传,网站福利应用正在更新中…… 福利区已修复完毕,不知道能活多久! 证书已经上传(回复 证书 获取证书下载链接),证书使用教程查看历史文章 【福利升级】iOS苹果端免越狱 手机端签名神器教程来了! 删掉之前的APP再重新下载即可! 证书很不稳…

java程序员语录_「java程序员面试题」2018java程序员面试题整理 - seo实验室

java程序员面试题1.PathVariable注解和requestParam注解的区别。RequestParam注解是获取静态URL传入的参数PathVariable是获取请求路径中的变量作为参数/需要和RequestMAPPing("item/{itemId}") 配合使用2.Param注解和RequestParam注解的区别。Parm 指定request中必…

java webshell_网站漏洞测试 关于webshell木马后门检测

前段时间我们SINE安全收到客户的渗透测试服务委托,在这之前,客户网站受到攻击,数据被篡改,要求我们对网站进行全面的渗透测试,包括漏洞的检测与测试,逻辑漏洞.垂直水平越权漏洞,文件上传漏洞.等等服务项目,在进行安全测试之前,我们对客户的网站大体的了解了一下,整个平台网站,包…

java摄影网站源码_基于jsp的摄影网站-JavaEE实现摄影网站 - java项目源码

基于jspservletpojomysql实现一个javaee/javaweb的摄影网站, 该项目可用各类java课程设计大作业中, 摄影网站的系统架构分为前后台两部分, 最终实现在线上进行摄影网站各项功能,实现了诸如用户管理, 登录注册, 权限管理等功能, 并实现对各类摄影网站相关的实体进行管理。该摄影…

scrapy入门实战-爬取代理网站

相关视频: Python之scrapy入门_哔哩哔哩_bilibili 转:scrapy入门实战-爬取代理网站 - JayMu - 博客园 入门scrapy。 学习了有这几点 1.如何使用scrapy框架对网站进行爬虫; 2.如何对网页源代码使用xpath进行解析; 3.如何书写…

逆向路上强大的在线网站

在线 arm汇编 转 hex进制 优秀网站推荐: https://armconverter.com/ 算法之美编码算法 : https://gchq.github.io/CyberChef/ 不想写代码可以用该网站生成:(圈内人开发的) https://www.spidertools.cn/#/formatHeader…

总裁导航v2.5.1修复版秒收录网站模板源码指定定时收录导航站

总裁导航系统,一款多功能的php导航系统,不仅仅支持自助申请收录,并且还支持自助购买广告 还有很多功能! 1.新增加前台用户自助购买广告功能 2.新增加自动审核功能 3.自动定时提交百度收录! 环境要求:PHP7.…

主流影视网站8合一H5视频源码自动更新数据

更新说明: 1.升级全新数据源,速度更快,资源更全 2.取消系统缓存机制,修正因大量缓存导致服务器硬盘填满bug 3.源码精简,体积更小,更易维护或二次开发 4.修复使用百度统计等统计代码时无法正常统计bug 已测…

宁波医院挂号网上预约,为什么跳出本网站部允许代理服务器,当心!预约挂号后爽约会怎样?后果有点重…...

原标题:当心!预约挂号后爽约会怎样?后果有点重…日前,为加强预约挂号管理,提高号源利用率,规范就医行为,市卫生计生委组织编写了《宁波市预约挂号退号与爽约管理规范》。预约挂号后爽约会怎样&a…

一定要注意网站图片版权问题!

陆续听很多客户和服务提供图片版权问题,他们的网站都被搞了! 现在有很多这种版权流氓到处钓鱼,他们把各种申请了版权的图片放到网上,等着你去用,你只要用了他们的图片,就有可能被靠,被勒索&…

百度站长平台使用教程:几个普通网站没机会用到的功能

今天给大家分享几个百度站长平台中比较特殊的功能服务,这几个功能普通网站可能接触不到,或者是没法满足使用条件,因为准入的门槛比较高,所以我们简单了解一下就可以了。 一、专业问答 如上图所示,这就是专业问答在百度…