Top "Php-7" questions

PHP 7 is the successor to PHP 5.6, it was released on December 3, 2015.

Colon after method declaration?

public function getRecords(int $id): array; Hi, can someone tell me what colon is doing here, in this method declaration …

php php-7
PHP 7 changes to foreach: Can I still delete items in they array on which I'm iterating?

The PHP 7 Backward-Incompatible Changes Document says the following about foreach: When used in the default by-value mode, foreach will now …

php php-7
Memcache extension with PHP 7 on CentOS fails to install

I'm trying to upgrade a fairly large PHP 5.3 code base to PHP 7. It's hosted on CentOS 6.5, so I want to …

memcached pecl php-7 centos6.5
PHP 7 and strict "resource" types

Does PHP 7 support strict typing for resources? If so, how? For example: declare (strict_types=1); $ch = curl_init (); test ($ch); …

php php-7
In PHP 7.0 Fatal error: Uncaught Error: Call to undefined function json_encode()

My server configurations: [root@server ~]# php -v PHP 7.0.22 (cli) (built: Aug 7 2017 16:18:27) ( NTS ) [root@server ~]# nginx -v nginx version: nginx/1.10.2 OS: …

php json nginx fatal-error php-7
Call to undefined function simplexml_load_file()

I have php 7.0 running on my ubuntu server. php -m command says: [PHP Modules] calendar Core ctype curl date dom …

ubuntu simplexml php-7
Imagick don't open pdf files with "Failed to read the file" exception

Trying to open PDF file from php script drop into fault with error: Uncaught ImagickException: Failed to read the file …

php pdf imagemagick imagick php-7
PECL yaml in PHP7

Having some issues with pecl yaml in PHP7 (see below for error log). What I can see on: https://pecl.…

yaml pecl php-7
"Empty delimiter" Warning when using PHP explode() function

In javascript, var myStringToArray = myString.split(''); is perfectly acceptable. But in PHP, $My_String_To_Array = explode('', $My_…

php split explode php-7