xref: /PHP-8.0/Zend/tests/034.phpt (revision f8d79582)
1--TEST--
2Testing multiples 'default:' in switch
3--FILE--
4<?php
5
6switch (1) {
7    case 2:
8        print 'foo';
9        break;
10    case 3:
11        print 'bar';
12        break;
13    default:
14        print 1;
15        break;
16    default:
17        print 2;
18        break;
19    default:
20        print 3;
21        break;
22}
23
24?>
25--EXPECTF--
26Fatal error: Switch statements may only contain one default clause in %s on line 13
27