php-7 Questions
5
Solved
Consider the following code. In the event that an exception occurs, the trace (which will be logged and stored in a database) will include the sensitive password data. How can sensitive data in cas...
Mccay asked 18/6, 2021 at 22:24
7
I have a controller with the "getUsers" function in a controller called "UserController" , and inside it I want to call a function of the "CarController" controller called "getCars", the two option...
5
Solved
I'm experimenting with Deployer to deploy Laravel application into shared hosting (using laravel recipe) from my local ~/Code/project_foo.
The point is that when I'm connected to my shared hosting...
Chanellechaney asked 1/3, 2018 at 12:15
6
Solved
I was testing return types with PHP 7.
I've created a simple script to test return types of PHP 7:
<?php
Class Obj {
public function __construct(){
}
public function test(): string { //...
Gravedigger asked 22/4, 2015 at 9:12
3
Solved
Does PHP 7 support strict typing for resources? If so, how?
For example:
declare (strict_types=1);
$ch = curl_init ();
test ($ch);
function test (resource $ch)
{
}
The above will give ...
12
Solved
I've run into an issue with updating the header.php file in a WordPress website.
Firstly, I tried updating the file manually through C-Panel -> File Manager. The code appears to stay in the file...
2
(examples at the bottom!!!)
we have just upgrade our backend to PHP7 and after that, we have found a bug in our code related to an ArrayObject.
The code just loops over a copy of an Object (type ...
Conde asked 17/10, 2016 at 13:17
3
Solved
I try install ncurses extensions for php7.0 but I get this error
/bin/bash /tmp/pear/download/ncurses-1.0.2/libtool --mode=compile cc -I. -I/tmp/pear/download/ncurses-1.0.2 -DPHP_ATOM_INC -I/tmp/p...
Nimble asked 25/8, 2016 at 17:20
5
Solved
I have the following error while running this code below:
Code:
<?php
$a = array(00001, 00008, 00009, 00012);
print_r($a);
?>
Error:
Parse error: Invalid numeric literal.
Why this ...
4
Solved
I am wondering how the PHP spaceship operator compares strings, objects and arrays. For example, the below code.
echo "Its Me at SO" <=> "Its Me at SO";
will return 0, a...
Panay asked 15/1, 2016 at 12:56
12
This is driving me crazy second day. I'm new to Laravel and trying to get Laravel 6 work on Google App Engine Standard.
Tried: This tutorial and other ones, but it still fails to load Laravel index...
Hayott asked 24/9, 2019 at 19:39
4
I have Centos 7 and Virtualmin installed, with the tipycal php-fpm 5.4, 7.0, 7.1 that you can choice between the versions you prefer on every virtualhost via Virtualmin control panel, and everythin...
Hypothermal asked 18/5, 2019 at 10:37
3
Solved
In PHP 7 we have a new operator, spaceship operator <=>, and I found it very similar (if not the same) to strcmp().
Is there any difference between them?
Edit: Im asking the difference betw...
2
Solved
In PHP7, when a method sets a given parameter type and result type, is it necessary to document them again in the PHPDoc ?
Since
function foo(string $text): bool
{
return true;
}
Is equivalen...
5
While installing sqlsrv module for PHP7 i'm getting following error -
No releases available for package "pecl.php.net/sqlsrv
Command used
sudo pecl install sqlsrv
Any idea how to resolve...
8
Solved
I am using
Windows10 64 bit
Apache 2.4.25 (Win64)
PHP 7.1.0-Win32-VC14-x64
when i try calling curl_init() function, i get an error saying "Call to undefined function curl_init()"
tried following
...
Hypotrachelium asked 24/1, 2017 at 5:56
10
Solved
Referred this link https://anton.logvinenko.name/en/blog/how-to-install-redis-and-redis-php-client.html
And done following steps
PhpRedis for PHP 7 (Skip it if you have different PHP version)
In...
13
Solved
I'm running windows 10 fresh copy and I just installed visual studio code.
I was trying to develop a PHP project using VS Code.
But I'm having trouble in setting up the environment.
I saw a blog p...
Compartmentalize asked 27/10, 2016 at 14:57
4
I'm trying to create a custom validation rule that accept a parameter, but this parameter is the name of another field in the request, like for the required_with rule.
I easily can handle given pa...
Burgee asked 21/10, 2019 at 12:54
16
Solved
I have read many solutions on internet , but still cannot change upload_max_filesize value (upload_max_filesize always = 2M )
here is my loaded php.ini in phpinfo() :
Configuration File (php.ini...
5
I'm transitioning my website from PHP v.5 installed on a shared web-hosting account (at DreamHost) to run on PHP 7.3.11. After transition, I started noticing that once in a while I get these warnin...
6
Solved
I have a clean install of apache/httpd and php7.1.0 running on CentOS 7.
When I execute from the command line:
php -v
I get the expected response:
PHP 7.1.0 (cli) (built: Dec 1 2016 08:13:15) ...
5
Solved
I was following a couple links that had this same sequence, namely this example. I was unable to get it done successfully. Here is the output from terminal
MacBook-Pro-4:/ SHennessy$ brew tap home...
Gropius asked 21/1, 2017 at 15:15
5
Solved
I want to retrieve public url for all the files stored using
storage::putFile('public/spares');
So, this is the issue I'm using
storage::files('public/spares');
but it provides this out...
Discommodity asked 4/5, 2017 at 18:0
2
Solved
I have an app the uses an SFTP connection to download files. It was working correctly in PHP 5.6, not so much in PHP 7. The error I get is as follows:
PHP Warning: filesize(): stat failed for ssh2...
1 Next >
© 2022 - 2025 — McMap. All rights reserved.