They are moving PHP to a more strict language, and this is a very good
thing.
With PHP you can write code like:
$array = array('name'=>'Stig', 'email'=>'[email protected]');
echo $array['telephone'];
Here PHP >5 will allow this and show no warnings, even though the
'telephone' key was never defined. It is the same with variables, you
cannot just start using a variable that hasn't been defined.
Having PHP move to a more strict, professional language is something
that should have happened a long time ago IMHO. Start programming like
you would in Java or C and you will have no problem.
As for books, there are a great deal of books out there that are
teaching terrible procedural PHP code. I happened to read a textbook
used by a large University here in melbourne, MySQL queries had no
'real_escape_string', $_GET variables were echoed directly to page with
no htmlentities. We should be advocating the use of good code, and
teaching these things properly.
Regards,
Stig
Michael wrote:
> The question is WTH were they thinking?
>
> PHP 5.3.0 seems to break quite a few things, and certainly what's wrong with
> referring to variables as $_GET["variable"] ?
>
> That's what all the books and online guides teach
--~--~---------~--~----~------------~-------~--~----~
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]
-~----------~----~----~----~------~----~------~--~---