xref: /PHP-7.2/ext/opcache/tests/issue0057.phpt (revision ac05e68f)
1--TEST--
2ISSUE #57 (segfaults in drupal7)
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.optimization_level=-1
7--SKIPIF--
8<?php require_once('skipif.inc'); ?>
9--FILE--
10<?php
11
12class ZException extends Exception {
13}
14
15function dummy($query) {
16    try {
17        switch ($query) {
18            case 1;
19            break;
20            case 2;
21            break;
22        default:
23            throw new Exception('exception');
24        }
25    } catch (ZException $e) {
26        return NULL;
27    }
28}
29
30try {
31    dummy(0);
32} catch (Exception $e) {
33    echo $e->getMessage();
34}
35
36?>
37--EXPECT--
38exception
39