Is PHP_BINDIR on Windows incorrect?

When I run a script on Windows using PHP 5.6 (coming from WampServer 2.4 ), I get this confusing result:

$binary = PHP_BINARY;  // $binary: "C:\wamp\bin\php\php5.6.15\php.exe"
$bindir = PHP_BINDIR;  // $bindir: "C:\php"

PHP_BINARYtrue, but PHP_BINDIRcompletely wrong. Is the last variable obsolete or something else? Any other ideas why it outputs some random path that doesn't even exist on my disk?

+4
source share
2 answers

PHP_BINARYis the value set at runtime (when the script is running)

PHP_BINDIRis the value set at compile time , not at run time.

, configure ( Linux: ./configure --prefix <path>). - C:\php. PHP.

, PHP_BINARY.

+4

PHP_BINDIR, php-internals/11c783wgty/bug-54514 . , .

, , , , Windows, - , , Windows . , php, unix-, Windows-, , PHP , .

PHP_BINDIR, , .

0

Source: https://habr.com/ru/post/1629200/


All Articles