Created
October 3, 2017 10:38
-
-
Save oskarcalvo/eecdc2eae5157be418ef461eb7dbefe2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| <?php | |
| /** | |
| * Created by PhpStorm. | |
| * User: oskar | |
| * Date: 3/10/17 | |
| * Time: 10:00 | |
| */ | |
| $time_start = microtime(true); | |
| echo memory_get_usage(), "\n"; | |
| function ejecutar_switch($data = NULL) { | |
| $array = []; | |
| switch ($data) { | |
| case 'wadus': | |
| $array['wadus'] = 'cuarenta y dos'; | |
| break; | |
| case 'wadus2': | |
| $array['wadus2'] = 'cuarenta y tres'; | |
| break; | |
| case 'wadus3': | |
| $array['wadus3'] = 'cuarenta y cuatro'; | |
| break; | |
| default: | |
| $array['wadus4'] = 'cuarenta y cinco'; | |
| break; | |
| } | |
| return $array; | |
| } | |
| $resultado = ejecutar_switch('wadus'); | |
| var_dump($resultado) ; echo "\n"; | |
| $resultado = ejecutar_switch(); | |
| var_dump($resultado) ; echo "\n"; | |
| $time_end = microtime(true); | |
| $execution_time = ($time_end - $time_start)/60; | |
| echo '<b>Total Execution Time:</b> '.$execution_time.' Mins'; | |
| echo "\n"; | |
| echo memory_get_usage(), "\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment