Re: "use strict" or similar in PHP?

From: Date: Thu, 26 Feb 2009 21:20:06 +0000
Subject: Re: "use strict" or similar in PHP?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-288871@lists.php.net to get a copy of this message
I was thinking more of something to fail at compile time if possible :-)regarding second, that solution with sprintf is vulnerable to SQL injection, that is why I wanted something with parameters, instead of escaping everything myself Thanks for your help anyway --- On Thu, 2/26/09, 9el <lenin@phpxperts.net> wrote: Is there in PHP something like "use strict" from perl? I find it pretty annoying to need to run script over and over again just to find out that I made typo in variable name. see  error_reporting(E_ALL|E_STRICT);    :) Is there some way for PHP to cache some data on the page? I like very much PHP's speed but it would be even better to be able to cache some frequently used data from database? Also regarding databases, I liked a lot java's way of sending data to database using parameters ("select * from user where username = ?" and then passing parameter separately with database doing necessary escaping and everything)... Is there something like PHPDBC similar to JDBC? You can use  sprintf("select * from user where username=%s",$user); Also you can look into the great frameworks of PHP like  ZendFramework, CodeIgniter, CakePHP etc. TIA, Hans -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#288871) next »