add switch definition php/js