Skip to content

Weird behaviour in including #26

@ahme-d

Description

@ahme-d

Hi,

I have this class which i included in composer.json:

    "files": ["app/lib/coolstuff/A.class.php"]

A.class.php:

<?php
require_once 'functions.php';

class A
{
    public function __construct()
    {
        if (function_exists('foobar')) {
            file_put_contents("log.txt", "yes");
        }
        else{
            file_put_contents("log.txt", "no");
        }
    }
}

And functions.php :

function foobar(){
 // do something complicated
}

when using async, function foobar isn't defind but functions.php is included ( using get_included_files ) log.txt has "no" , log.txt path is root path

when using sync driver, foobar is defined and log.txt has "yes" , log.txt path is public_path

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions