Your Opinion

From: Date: Tue, 16 Dec 2003 07:39:01 +0000
Subject: Your Opinion
Groups: php.general 
Request: Send a blank email to php-general+get-172777@lists.php.net to get a copy of this message
Looking to squeeze as much out of my core scripts (not that they are slow ;) ). The thought arose that I can replace simple functions like is_string(), is_array() with simpler php code. For example -> <?php $foo = array('foo','foo','foo','foo','foo','foo','foo','foo','foo','foo', 'foo','foo','foo','foo','foo','foo','foo','foo','foo','foo', 'foo','foo','foo','foo','foo','foo','foo','foo','foo','foo'); for($x=0; $x < 50; $x++) { if ($foo === @(array)$foo) // if (is_array( $foo )) { echo 'true<br />'; } else { echo 'false<br />'; } } ?> It seems to work, and debugging it via APD shows that it uses less resources. Just an idea, nothing serious. Thanks

« previous php.general (#172777) next »