Questions tagged [php-7.2]

Use this tag for version-specific issues relating specifically to PHP 7.2.Use with the [php] tag

Deprecations: https://wiki.php.net/rfc/deprecations_php_7_2

GA release is scheduled for 2017-11-30: https://wiki.php.net/todo/php72#timetable

724 questions
0
votes
1 answer

PHPUnit 5.7 to 6.4 Upgrade - Extensions Classes Missing

I'm trying to upgrade our unit tests from PHPUnit 5.7 to 6.4. The major revision changed the autoloading of classes and I've been going around updating my base test classes to use the new ones. We use the implementation of the ArrayDataSet found…
0
votes
2 answers

PHP7 and supported multiple inheritance?

We know that PHP5 or later allow OOP but not support multiple inheritance like C++ Does PHP7 supported Multiple Inheritance?
amir mehr
  • 25
  • 1
  • 4
-1
votes
2 answers

How to fix undefined variable problem in php?

I have a php code in which I am getting the error message Notice: Undefined variable: c at LineA // LineA The function definition is shown below: function HelloWorld($a,$b = 0,$c = [],$max_text_length =…
flash
  • 1,455
  • 11
  • 61
  • 132
-1
votes
1 answer

php repository is unavailable for Ubuntu-16.04 as per Dec 16, 2021. Need to add imap module

Ubuntu 16.04.06 with php7.0.33. I can only install php7.0-dev package. Is it possible to compile php7.2.34-imap module using php7.0-dev package? I downoladed php7.2.34 source, I'm in source/ext/imap/ directory and run phpize will it give the right…
-1
votes
1 answer

phpspreadsheets/ phpoffice not working on linux

I have downloaded composer successfully and I am trying to use the phpospreadsheet library but I keep getting these errors although this is a basic code. it works on windows but not on linux. Code Sample: require 'vendor/autoload.php'; …
maja
  • 43
  • 8
-1
votes
1 answer

There is option to get expected type of variable in PHP?

I have method which cast array to object by using $class = get_class($object); $methodList = get_class_methods($class); But now I need had information about expected type of variable too. For example from this method: public function setFoo(int…
kris016
  • 147
  • 2
  • 10
-1
votes
1 answer

Declaration of DoctrineORMEntityManager ::initializeProxy() must be compatible with ProxyManager\Proxy\LazyLoadingInterface::initializeProxy(): bool

When I type this command php app/console assetic:dump --env=prod --no-debug or this one php app/console cache:clear --env=prod I got the following error : PHP Fatal error: Declaration of…
clement-D
  • 59
  • 7
-1
votes
1 answer

How can I install a recent version of php?

I have a problem with a Symfony project that I have to work on, when I try a 'composer install' on my bash, I have this message : Loading composer repositories with package information Installing dependencies (including require-dev) from lock…
malongoDB
  • 1
  • 3
-1
votes
3 answers

Why is my if statement not working: Unexpected ! after ||

My text editor and php says unexpected ! after the || someone know this bug ? This is very weird foreach($data as $pile->data) if(!is_float($data) || ! is_int($data)) die('Pile::sort() invalid $pile data'); I use VS code as text…
-1
votes
2 answers

PHP if condition error syntax error in server

I have used one if condition and i'm using opencart platform code is working fine in my local but not in the server // if something // else something this code giving me an error in my server…
-1
votes
1 answer

INI directive ‘mbstring.func_overload’ is deprecated since PHP 7.2

Using PHP Compatibility Checker, got this warning INI directive 'mbstring.func_overload' is deprecated since PHP 7.2 is there any way to handle this warning?
Owais Alam
  • 287
  • 1
  • 9
  • 13
-1
votes
1 answer

Array not populating in PHP 7.2

I am populating an array $du through a foreach loop like this foreach ( $arr as $v => $r ) { $du['id'] = $r['id']; $du['name'] = $r['name']; $Sales->insert($du); $du = ''; } The above piece of code…
abbas
  • 238
  • 2
  • 18
-1
votes
2 answers

Session is set, but not working after going to another page just at first time

I have a login.php and a few pages for userarea. After login, it works and it goes to user.php and I use some $_SESSION variables to show the name and username. It works, also my $_SESSION variables are set at first time too and it will stay on the…
Navidms
  • 21
  • 1
  • 6
-1
votes
2 answers

How to understand this magic: "array_values() expects parameter 1 to be array, array given"?

Here is my simple code: $item['suppliers'] = array_values($item['suppliers']); And here is PHP error log: [22-May-2019 13:05:23 Europe/Moscow] PHP Warning: array_values() expects parameter 1 to be array, array given in /var/www/xxx/Controller.php…
-1
votes
2 answers

trying to get PDO to load

I'm trying to get PDO to load on a PHP7.2 apache server (aws) I keep running into these errors PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/5.5/modules/pdo.so' - /usr/lib64/php/5.5/modules/pdo.so: cannot open shared…
Ruegen
  • 605
  • 9
  • 35