Skip to content

Commit

Permalink
opcache_is_script_cached: file_cache: test
Browse files Browse the repository at this point in the history
  • Loading branch information
iamacarpet committed Nov 28, 2024
1 parent 200193b commit 798a07d
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions ext/opcache/tests/gt16979.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
--TEST--
GH-16979: opcache_is_script_cached support file_cache argument
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.jit=disable
opcache.jit_buffer_size=0
opcache.file_cache={TMP}
opcache.file_cache_only=1
opcache.log_verbosity_level=4
--EXTENSIONS--
opcache
--FILE--
<?php

opcache_compile_file(__FILE__);

var_dump(
opcache_is_script_cached(__FILE__, false)
);

var_dump(
opcache_is_script_cached(__FILE__, true)
);

?>
--EXPECT--
bool(false)
bool(true)

0 comments on commit 798a07d

Please sign in to comment.