6 // See comment in php/run-php-tests.sh.
7 //putenv ('LIBGUESTFS_DEBUG=1');
9 $g = guestfs_create ();
11 echo ("Failed to create guestfs_php handle.\n");
14 if (guestfs_add_drive ($g, "/dev/null") == false) {
15 echo ("Error: ".guestfs_last_error ($g)."\n");
18 if (guestfs_launch ($g) == false) {
19 echo ("Error: ".guestfs_last_error ($g)."\n");
22 $version = guestfs_version ($g);
23 if ($version == false) {
24 echo ("Error: ".guestfs_last_error ($g)."\n");
27 if (!is_int ($version["major"]) ||
28 !is_int ($version["minor"]) ||
29 !is_int ($version["release"]) ||
30 !is_string ($version["extra"])) {
31 echo ("Error: incorrect return type from guestfs_version\n");