Questions tagged [php-7]

PHP 7 is the successor to PHP 5.6, it was released on December 3, 2015. Use this tag for issues relating to development using PHP 7

PHP 7 is the next version of . It succeeds , which is the last release of the PHP 5.X version. PHP 7.0.0 was released on Dec 3, 2015

PHP 6

Several years ago there was a major push to make PHP Unicode compatible and this push focused around what was then slated to be PHP 6. An internal version was developed and a lot of material was published (including some books) about this new version. Serious problems with the implementation arose, however, and the project was abandoned, with most of the surviving code being implemented in PHP 5.4. To avoid confusion with this discussion the decision was made to skip version 6.

Development

You can download the PHP 7 source and compile it yourself. Official builds are available on the PHP website.

Features

New features of PHP 7 include (See all accepted features):

PHP7 migration guide

There's a whole section on Migrating from PHP 5.6.x to PHP 7.0.x in the manual:

© 1997-2015, The PHP Documentation group, CC-BY 3.0

Information

  • For global question on PHP, please use the generic tag:
  • If you want to talk about PHP or if you have a question, you can come to the PHP chat room
2761 questions
0
votes
1 answer

Install php-opcache for PHP installed via Remi's repository

I have an environment with the following setup: Centos/RHEL 8 PHP 7.4 installed from Remi's repository I have set installed php like so: sudo dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm sudo dnf -y install…
Aaryn
  • 1,601
  • 2
  • 18
  • 31
0
votes
3 answers

Accessing a webpage only in the specified IP address

I build a dashboard using PHP & MySql, where my company employees can log in, log out, request leaves, add work reports & maintain their attendance. everything was working fine, but my manager wants that dashboard to open only in our office…
0
votes
1 answer

How to transform a className to uninstantiated class in >php7.1

As expected the example below does not work but how can i tell php that my classname-string should be an uninstantiated class ? I know that i could work around with some tricks but is there a proper way? thanks to magnus i like to add that in use I…
Erik255
  • 1,463
  • 1
  • 11
  • 13
0
votes
1 answer

CakePHP Mailer "Unknown email configuration" error

I am having troubles with the Mailer after upgrading from CakePHP 3 to 4. This is the relevant part my configuration: [ 'default' => [ 'className' => 'Mail', 'host' =>…
mrodo
  • 565
  • 5
  • 21
0
votes
0 answers

how can i fix notice :Trying to access array offset on value of type bool

I search alot about this error but I didn't understand what is the problem in my setuation. I know it should be a little problem in my codes but i am learning to work on back-end codes and php.so please help me Notice: Trying to access array offset…
0
votes
1 answer

GAE PHP 7 403 FORBIDDEN error while got URL to upload file

I got some problem while managing migration from PHP5 to PHP7. Actually, what I was doing with php5, to get an URL where upload a file, was something like this: $options = [ 'gs_bucket_name' => 'mybucket.appspot.com' ]; $myvar =…
0
votes
1 answer

When transferring files to the server with curl ftp in php, it saves with a .tmp extension and a random name

I wrote the php code and the code to be loaded using curl, but every time I upload it to the server, it loads it with a .tmp extension and a different name. What is the reason for this? PHP Code
0
votes
1 answer

AddSelect In searchQueryBuilder use condition

I have to get my customers, And all customers Have a (customers groups) for example : customers/seller/guest/buyer.... And any customer Have a default Group , And I want to get the default group of this customer only when he is a Buyer but when he…
0
votes
1 answer

PHP 7 fopen/file_get_contents with "И" and "Э" utf-16 symbol in URL return HTTP 500 without even calling server (works on PHP8)

Get strange behaviour when one of two UPPERCASE Cyrillic symbols "И" and "Э" used inside url link: file_get_contents("http://localhost/И") fopen("http://localhost/И", "r") Both return below error, but server even had not been called: failed to open…
nahab
  • 1,308
  • 17
  • 38
0
votes
1 answer

How to make this array assignment work in php5.6?

I have a part of code, that was written in php7: [$columns, $values, $conditions] = $this->gatherConditions($identifier); where $identifier is an array. When I run this code on php5.6 server it shows error - unexpected "=" on line X. How this line…
Krechet USA
  • 15
  • 1
  • 3
0
votes
1 answer

Warning: Undefined array key

Please help, the error is something like this : Warning: Undefined array key "Nama" in D:\xampp\htdocs\phpdasar\pertemuan7\latihan2.php on line 11 Warning: Undefined array key "NIM" in D:\xampp\htdocs\phpdasar\pertemuan7\latihan2.php on line…
Dewi Sari
  • 3
  • 1
  • 4
0
votes
1 answer

PHP Autoload Classes Is Not Working With Namespaces

I have tried to write the following code but cannot figure out why it will not find the class in spl_autoload_register() with a namespace? Error I get is: Warning: require_once(src/test\StringHelper.php): failed to open stream: No such file or…
sam67
  • 61
  • 2
  • 12
0
votes
0 answers

PHP - Get Meta Information by EmbedURL

How I will get meta information specified by EmbedURL? I have tried get_meta_tags('raw_html'). But it returns nothing. MY HTML:
Souvik Das
  • 49
  • 2
  • 10
0
votes
1 answer

PHP - Get Meta Information by EmbedURL

How I will get meta information specified by EmbedURL? I have tried get_meta_tags('MY_VIDEO_URL'). But it returns nothing. MY HTML:
Souvik Das
  • 49
  • 2
  • 10
0
votes
1 answer

Parameter must be an array or an object that implements Countable after PHP 7 update

Could anybody help me on this please? Happend after updating to PHP 7.73 (stable) and updating theme as well as the plugins. /** * Get single meta box by name * * @param int $post_id * @param string $control_name valid meta…
Noob2013
  • 27
  • 1
  • 6
1 2 3
99
100