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?
PHP_BINARY
PHP_BINDIR
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.
./configure --prefix <path>
C:\php
, PHP_BINARY.
PHP_BINDIR, php-internals/11c783wgty/bug-54514 . , .
php-internals/11c783wgty/bug-54514
, , , , Windows, - , , Windows . , php, unix-, Windows-, , PHP , .
PHP_BINDIR, , .
Source: https://habr.com/ru/post/1629200/More articles:Best practice for deferred initialization of private class members - c ++Creating objects in another class in Excel VBA - vbaCRC error in Python gzip - pythonHow to call static methods inside the same class in python - pythonIs there a way to avoid the name of the size property in HQL? - javaFlask-WTF dynamic selection field gives "None" as a string - flask-wtformsRaising a Sails.js application raises a node.js approval error - node.jsHow to view 404 user page in Dropwizard - javayii2 - how to crop table from console - phpHazelcast broken node detection - javaAll Articles