Reverse switch
switch(true) { case $x == "hello": // $x is hello case is_numeric($x): // $x is a number case $x < 10: // $x is less than 10 }
11389 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
switch(true) { case $x == "hello": // $x is hello case is_numeric($x): // $x is a number case $x < 10: // $x is less than 10 }