mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Fix #41062: is_executable only looks at basic executables
This commit is contained in:
parent
a0f0f0446d
commit
8d8cd43bfc
1 changed files with 13 additions and 1 deletions
|
@ -37,7 +37,8 @@
|
|||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns &true; if the filename exists and is executable, or &false; on
|
||||
error.
|
||||
error. On POSIX systems, a file is executable if the executable bit of the
|
||||
file permissions is set. For Windows, see the note below.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
@ -74,6 +75,17 @@ if (is_executable($file)) {
|
|||
&reftitle.notes;
|
||||
¬e.clearstatcache;
|
||||
&tip.fopen-wrapper.stat;
|
||||
<note>
|
||||
<simpara>
|
||||
On Windows, a file is considered executable, if it is a properly executable
|
||||
file as reported by the Win API <literal>GetBinaryType()</literal>; for BC
|
||||
reasons, files with a <filename>.bat</filename> or <filename>.cmd</filename>
|
||||
extension are also considered executable. Prior to PHP 7.4.0, any non-empty
|
||||
file with a <filename>.exe</filename> or <filename>.com</filename> extension
|
||||
was considered executable. Note that <envar>PATHEXT</envar> is irrelevant
|
||||
for <function>is_executable</function>.
|
||||
</simpara>
|
||||
</note>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
|
|
Loading…
Reference in a new issue