Use this tag for version-specific issues relating specifically to PHP 7.3.Use with the [php] tag
Questions tagged [php-7.3]
319 questions
-1
votes
1 answer
How to write a valid callback for preg_replace_callback(): Requires argument 2, ''s:'.strlen('$2').':"$2";'',
In my config.php I have this old PHP5 function that I have tried to update for use in PHP7, but this error and warning is spoiling things:
PHP Warning: preg_replace_callback(): Requires argument 2, ''s:'.strlen('$2').':"$2";'', to be a valid…

Wes
- 1
-1
votes
1 answer
Merge 2 values in multidimensional array
After previously had exploded the data, there is a portion I need to rebuild/merge again.
period in [category-X] index [1] with its value [2] should be merged and positioned in index [1].
Finally , the rest of index in each category should be moved…

Toolbox
- 2,333
- 12
- 26
-1
votes
2 answers
$_SESSION does not keep values between pages
Observation:
Sending form data from page_1 and page_2 does not show both data in result file.
If sending page_1 one sees the result in result file. When sending page_2 the result of page_1 is gone and you only see the page_2. It behaves as the…

Toolbox
- 2,333
- 12
- 26
-1
votes
4 answers
Sort array based on user-defined order of index
I would like to restructure the array (not traditional sort), based on providing the wanted index order, e.g. [1,7,4].
Below just sorts ascending order based on value.
wanted result:
Array
(
[1] => c
[4] => b
[7] => a
)
My code:
$array…

Toolbox
- 2,333
- 12
- 26
-1
votes
1 answer
Report generator - save and redirect to report
I am creating a report generator, that should save a report and also redirect the user to a version of the report on a specific url (in this case I just added yahoo as test).
Question: Is it possible to save a file and redirect a user to an url in…

Toolbox
- 2,333
- 12
- 26
-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
1 answer
Fatal error: Uncaught ArgumentCountError: Too few arguments
How can I fix this problem?
Fatal error: Uncaught ArgumentCountError: Too few arguments to function get_config(), 1 passed in
my code is :
$site_name = get_config('site_name');
// Get site configuration
function get_config($conn, $setting_name)…

MHD
- 1
- 1
- 1
-1
votes
1 answer
Is there a way to pass a JsonSerializable object as an array parameter?
I'm in the process of updating a REST Api class; at the end of each method, I have to call the DoResponse method to transform the data I pass as the first parameter into a JSON string.
As part of the requirements, I created response objects for each…

JValker
- 374
- 2
- 14
-1
votes
3 answers
Value of Radio Button not print in php
I created a simple quiz program using only php and there are 4 different question and radio buttons and when i click any of option then print the value of radio buttons like A or B or C or D I created 4 php variable, assigned the values by $_POST…

ZIN
- 11
- 1
-1
votes
1 answer
When i am puting mysqli_fetch_assoc($query) in while loop to retrive data from database .the loop is iterate infinitly. why is it happening
When I put mysqli_fetch_assoc($query) inside variable $row, and then put $row into while loop while($row). The loop is iterating infinitely.
But when I put whole initialization while($row = mysqli_fetch_assoc($query)) in while loops condition then…

soumitra patra
- 1
- 1
-1
votes
1 answer
mysqli_fetch_assoc is not working in while loop after upgrade PHP version 5.2 to 7.3
I am not sure why this happen because some function is working with mysqli_fetch_assoc with while loop and some not mysqli_fetch_assoc is not working in while loop in a function.
I have used following PHP script
function…

Samir Sheikh
- 2,283
- 2
- 19
- 37
-1
votes
1 answer
i can't able to run composer install command under my /var/www/html/magento2
i am facing problem while setting up the magento server on Centos7 i have php 7.3 install in my centos ec2 instance
installed php 7.3.5, also tried to update composer using $composer update command it doesn't work
composer install

Sagar mochi
- 21
- 3
-1
votes
2 answers
Use constant as Function attributes
I've a question about function declaration. I would like have something like:
password_hash('er', PASSWORD_ARGON2I);
https://www.php.net/manual/en/function.password-hash.php
When I create a function, I would like declare some possibilities…

mpiot
- 1,482
- 2
- 15
- 36
-1
votes
1 answer
Symfony: Render must be compatible with Symfony\Bundle\FrameworkBundle\Controller\AbstractController::render
I'm following the tutorial: here and when i change to an AbstractController I get the following error:
Compile Error: Declaration of App\Controller\LuckyController::render() must be compatible with…

TheBritishAreComing
- 1,667
- 2
- 19
- 38
-2
votes
2 answers
Google App Engine error when use opencensus ext
WARNING: [pool app] child 29 said into stderr: "php-fpm: pool app: symbol lookup error: /opt/php73/lib/x86_64-linux-gnu/extensions/no-debug-non-zts-20180731/opencensus.so: undefined symbol: ZVAL_DESTRUCTOR"
I using GAE env flex. today GAE use…