7
¿Necesita romper el interruptor cuando se usa el retorno?
Me preguntaba si necesito usar "break" en la función "switch" cuando se usa "return". function test($string) { switch($string) { case 'test1': return 'Test 1: ' . $string; case 'test2': return 'Test 2: ' . $string; } } Lo he probado y funciona bien sin "interrupción". Pero necesito saber si esto …
110
php