xref: /php-src/ext/opcache/tests/jit/const_001.phpt (revision c16ad918)
1--TEST--
2JIT CONST: defined
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.file_update_protection=0
7opcache.protect_memory=1
8--EXTENSIONS--
9opcache
10--FILE--
11<?php
12function define_const() {
13    define("CUSTOM_CONSTANT", 1);
14}
15function test_defined() {
16    var_dump(defined("CUSTOM_CONSTANT"));
17    define_const();
18    var_dump(defined("CUSTOM_CONSTANT"));
19}
20
21test_defined();
22?>
23--EXPECT--
24bool(false)
25bool(true)
26