![]() |
PHP Experts, Optimization question
Looking to optimize a lengthy switch/case statement. Working on something like this, and considering how to optimize it and speed it up. It's not that slow yet but it might be when it's finished.
Code:
switch($var) { |
if your $action are text/word try to put them in array() or store them in your database and call it in a limited query output
|
Yeah you could do like:
Code:
$actions['val1'] = 'step1'; Code:
// First, put the values into a mysql database like: value | action |
fuck that get your host to install a PHP cache!
|
Quote:
$method = 'some' . $action; if (method_exists(array(&$object, $method))) { $function->$method; } I would do something like that ... |
All times are GMT -7. The time now is 11:54 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123