Automatically include all php files in a child theme directory

I suspect glob needs the current working directory to work, so you could try passing the full path of the file to the existing function you have…

include_all_php(dirname(__FILE__).'/includes');

Or set the current working directory first:

setcwd(dirname(__FILE__)."https://wordpress.stackexchange.com/");
include_all_php('includes');

Alternatively you could also use scandir:

$filepath = dirname(__FILE__).'/includes/';
$files = scandir($filepath);
foreach ($files as $file) {
    // match the file extension to .php
    if (substr($file,-4,4) == '.php') {include($filepath.$file);}
}