Hi all,
As an example, I have a statement like
[blue]if (is_array($var1)) && (count($var1) > 3) && ($var1[2] == 22 ) {...}[/blue]
Question: in visual basic, the compilation order of each section of the "if" construct is not guaranteed and as a result (in VB) if $var1 was not an array the compiler could generate and error on the statement "($var1[2] == 22)" because that construct is only applicable to arrays?
Does anyone know what happens in PHP?
Thanks ... Greg
Footnote: For the purposes of this question, please assume that the VB and PHP "if" constructs are the same. Also, I realise that I could split the above "if" statement into a three separate statements that would always compile correctly - I just want to understand what happens within the compile process of PHP. Thanks.
"Life is full of learning, and then there is wisdom"
As an example, I have a statement like
[blue]if (is_array($var1)) && (count($var1) > 3) && ($var1[2] == 22 ) {...}[/blue]
Question: in visual basic, the compilation order of each section of the "if" construct is not guaranteed and as a result (in VB) if $var1 was not an array the compiler could generate and error on the statement "($var1[2] == 22)" because that construct is only applicable to arrays?
Does anyone know what happens in PHP?
Thanks ... Greg
Footnote: For the purposes of this question, please assume that the VB and PHP "if" constructs are the same. Also, I realise that I could split the above "if" statement into a three separate statements that would always compile correctly - I just want to understand what happens within the compile process of PHP. Thanks.
"Life is full of learning, and then there is wisdom"