[ create a new paste ] login | about

Link: http://codepad.org/jNrQdM3U    [ raw code | output | fork ]

iDev247 - PHP, pasted on Mar 20:
<?

test('a');
test('b');
test('c');
test('d');
test('e');
test('f');

function test($a) {
    echo 'testing ' . $a . ': ';
    switch($a) {
       case 'c':
          echo 'C1 (C)';
          break;
       case 'b':
       default:
           echo 'C2 (B/Default)';
           break;
       case 'a':
          echo 'C3 (A)';
          break;
   }
   echo PHP_EOL;
}


Output:
1
2
3
4
5
6
testing a: C3 (A)
testing b: C2 (B/Default)
testing c: C1 (C)
testing d: C2 (B/Default)
testing e: C2 (B/Default)
testing f: C2 (B/Default)


Create a new paste based on this one


Comments: