[Phpmyadmin-devel] Initialize or Not
Marc Delisle
marc at infomarc.info
Sat May 17 16:25:37 CEST 2014
Le 2014-05-17 08:26, Chanaka Dharmarathna a écrit :
> Hi All,
>
> I'm just exploring the issues raised by scrutinizer. It raise issues
> like, variable is not initialized. Have a look at issue [0], complaining
> on code segment [1].
>
> Personally I like to initialize variables, before using it, even a value
> is assigning at some point of the execution path. In this case we can
> initialized it like $x=array('foo');
>
> As I remember Marc mentioned different thought on this kind of situation
> (at the LinuxTag booth). You may have good thoughts we should know.
Hi Chanaka,
I don't remember talking about this situation, but talking about
another kind of issue: when scrutinizer reports that some initialization
is not needed because, further in the code, there is a if/else pair that
initializes the same variable in all situations.
>
> So what we should do for this kind of issue ? Just ignore them since PHP
> does not force, or fix them ? Appreciate your thoughts.
Let's make scrutinizer happy ;)
>
> [0] : http://goo.gl/HNW8Be
> [1] : http://goo.gl/vUj25O
--
Marc Delisle
More information about the Developers
mailing list