mirror of
https://github.com/php/doc-en.git
synced 2026-03-25 16:22:20 +01:00
Fix #41062: is_executable only looks at basic executables
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user