|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
  [2014-07-27 07:57 UTC] lingtalfi at gmail dot com
 Description: ------------ Let create 2 files in a folder with name "dir": - x.php - x2.php Let put the following content in x.php: require_once 'x2.php'; $a = __DIR__; var_dump($a === $b); and the following content in x2.php: $b = __DIR__; Let's open x.php in a browser, it outputs true. Let's now repeat the same steps but within a folder named "diré". The output is false (in my case). PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 09:00:01 2025 UTC | 
Oh thank you. It turns out that the problem was apache httpd.conf encoding. I had a line like this in my virtual hosts: DocumentRoot "/Volumes/Macintosh HD 2/web/Komin>/service création/projets/doo" Pasting it from a text-editor in utf-8, it works well ($a===$b), however, pasting it from a text-editor in plain encoding makes it fail, although the exact same string appears in the text-editor window (I find this very confusing). Problem solved.