Thanks to visit codestin.com
Credit goes to github.com

Skip to content

dirname() and __FILE__ broken. #88

@vext01

Description

@vext01

Consider the following scenario:

$ pwd
/tmp
$ find a
a
a/z.php
$ cat a/z.php 
<?php

$p = dirname(__FILE__);
echo "p = '$p'\n";

?>

Now let's run this from /tmp in both php and hippyvm (e.g. php a/z.php):

PHP gives:

p = '/tmp/a'

Hippy gives:

p = '.'
  • dirname() is supposed to give an absolute path.
  • The wrong path is reported regardless of absolute/relative paths.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions