问题标签 [php-7.1]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
645 浏览

php - 用于用户检查的 PHP 7.1 查询发出警告:在 E:\XAMPP\htdocs 中遇到的非数字值

我遇到了一个奇怪的问题,我正在尝试使用 PHP 7.1 实现一个简单的 Usercheck。

但我收到了这个警告

警告:在 E:\XAMPP\htdocs 中遇到的非数字值... 第 29 行 第 29 行是 $checkUserExistanceSql。任何想法问题出在哪里?

0 投票
1 回答
692 浏览

symfony - 带有 PHP 7.1 返回类型声明的 phpDocumentor

我们正在尝试将 phpDocumentor 用于运行 PHP 7.1 的 Symfony 3 站点。

我们在几乎每个实体上都使用返回类型声明来保持整洁。phpDocumentor 似乎不支持这一点,尽管我在他们的 GitHub 上看到了几个对 PHP 7 支持的引用。

这是每个实体的错误:解析错误:语法错误,意外':',期待';' 或者 '{'

0 投票
1 回答
2768 浏览

php - 为什么 PHP7.1 中删除了两级中断,它的替代解决方案可能是什么?

我正在将生产代码从PHP5.3to迁移到PHP7.1,代码break 2;在 if 条件内嵌套了两级 while 循环,我得到以下错误:

PHP 致命错误:无法“打破”2 个级别

为什么 PHP7.1 中删除了两级中断,它的替代解决方案可能是什么?

0 投票
0 回答
52 浏览

php - (php 7.1.1)中的非法字符串偏移“类”

所以我想弄清楚,为什么 PHP 7.1.1 会为以下 _construct 函数抛出错误:

我得到这个错误。

警告:第 34 行 D:\Servers\Web Server\les.local.dev\wp-content\themes\mts_onepage\options\fields\layout\field_layout.php 中的非法字符串偏移 'class'

警告:无法将空字符串分配给第 34 行 D:\Servers\Web Server\les.local.dev\wp-content\themes\mts_onepage\options\fields\layout\field_layout.php 中的字符串偏移量

如果我删除 IF 部分,它检查是否$this->field['class']为空,错误就会消失。

我知道 PHP 7.1 改变了数组的工作方式,但我仍然不明白。

0 投票
1 回答
3108 浏览

php - PHP7:Apache memory_limit 与 mod_php7.c

我升级到 PHP 7.1,从那以后我无法重新启动 Apache。这是 systemctl status httpd.service 所说的:

现在这里是 httpd 文件:

第421行是php_value memory_limit 2048M,看不出有什么问题。

谢谢!

0 投票
0 回答
34 浏览

php - htaccess entries are being interpreted as requests

I have the following htaccess entries

From time to time, on pages that gets many hits per second, those entries are being sent to my index.php (where I use mod rewrite to route all requests to.

I see the following as requests routed to my index.php:

I am using php 7.1.1 and apache 2.2 I am thinking of moving those values into php.ini, which will solve the problem, but my worry is this is only a symptom of some other problem I have.
Any idea how this is caused or how to further debug this?

More info:
I do not see entries for those requests in the apache access logs.
I see them through a log I write to in my index.php

0 投票
0 回答
1867 浏览

php - PHP 7.1 出现“zend_mm_heap 损坏”

我正在通过 Travis CI 测试我的“Arrayy”库,但是当我使用 PHP 7.1 === error "zend_mm_heap corrupted" 运行测试时它崩溃了......我该如何调试呢?知道为什么会这样吗?

0 投票
1 回答
39 浏览

php - 查询返回数组集合而不是模型集合

我使用 Laravel 5.3.31 和 PHP 7.1.2 创建了一个带有宅基地的网站。我在远程服务器上托管了相同的站点,也使用 Laravel 5.3.31 和 PHP 7.1.3。

我的一个观点中有以下代码:

在宅基地网站上,我得到以下结果:

另一方面,在我的远程服务器上,我得到了这个结果:

] }

因此,我无法在远程服务器上执行 $user->uid ,我无法理解这可能是什么原因。有任何想法吗?这可能是PHP问题吗?

0 投票
1 回答
540 浏览

apache - 在 Centos 7 上重新启动 httpd 服务时为 pecl_http 升级 php7.1 时出错

任何人都知道如何解决 pecl_http.so 的以下错误?

PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/http.so' - /usr/lib64/php/modules/http.so: undefined symbol: uidna_IDNToASCII in Unknown on line 0

以下是安装的软件包。

以下是 PHP 包:

0 投票
1 回答
2705 浏览

php-7.1 - 用于类型提示的 PHPCS 规则

是否有检查所有函数的类型提示的规则?

例如,它必须在参数前面有一个类型,并且函数必须有一个指定的返回类型。