getcwd

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Gets the current working directory
<?php getcwd(): string|false
<?php     private function replaceCwd($file)

    {

        $cwd = getcwd();

        if ($cwd === false) {

            return $file;

        }
<?php     protected static function clearCompiled()

    {

        $laravel = new Application(getcwd());



        if (is_file($configPath = $laravel->getCachedConfigPath())) {

            @unlink($configPath);
<?php <?php



$publicPath = getcwd();



$uri = urldecode(

    parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) ?? ''
<?php                 ? new Process($command, null, $this->environment)

                : Process::fromShellCommandline((string) $command, null, $this->environment);



        $process->setWorkingDirectory((string) ($this->path ?? getcwd()));

        $process->setTimeout($this->timeout);



        if ($this->idleTimeout) {
<?php         class_alias(AbstractListener::class, 'Tests\Integration\Foundation\Fixtures\EventDiscovery\Listeners\AbstractListener');

        class_alias(ListenerInterface::class, 'Tests\Integration\Foundation\Fixtures\EventDiscovery\Listeners\ListenerInterface');



        $events = DiscoverEvents::within(__DIR__.'/Fixtures/EventDiscovery/Listeners', getcwd());



        $this->assertEquals([

            EventOne::class => [
<?php     {

        class_alias(UnionListener::class, 'Tests\Integration\Foundation\Fixtures\EventDiscovery\UnionListeners\UnionListener');



        $events = DiscoverEvents::within(__DIR__.'/Fixtures/EventDiscovery/UnionListeners', getcwd());



        $this->assertEquals([

            EventOne::class => [
<?php                 ->toString();

        });



        $events = DiscoverEvents::within(__DIR__.'/Fixtures/EventDiscovery/Listeners', getcwd());



        $this->assertEquals([

            EventOne::class => [
<?php });



it('can resolve builtin value types', function () {

    $this->container->add('rootPath', getcwd());

    $this->container->add('testPath', 'tests');



    $instance = $this->container->get(TestSuite::class);
<?php use Pest\TestSuite;



it('does not allow to add the same test description twice', function () {

    $testSuite = new TestSuite(getcwd(), 'tests');

    $method = new TestCaseMethodFactory('foo', 'bar', null);



    $testSuite->tests->set($method);
<?php );



it('alerts users about tests with arguments but no input', function () {

    $testSuite = new TestSuite(getcwd(), 'tests');



    $method = new TestCaseMethodFactory('foo', 'bar', function (int $arg) {

    });
<?php );



it('can return an array of all test suite filenames', function () {

    $testSuite = new TestSuite(getcwd(), 'tests');



    $testSuite->tests->set(new TestCaseMethodFactory('a', 'b', null));

    $testSuite->tests->set(new TestCaseMethodFactory('c', 'd', null));
<?php $files       = [__DIR__ . '/../vendor/autoload.php', __DIR__ . '/../../../autoload.php'];

$loader      = null;

$cwd         = getcwd();

$directories = [$cwd, $cwd . DIRECTORY_SEPARATOR . 'config'];

$configFile  = null;
<?php     protected function findComposer()

    {

        $composerPath = getcwd().'/composer.phar';



        $phpPath = (new PhpExecutableFinder)->find();
<?php     protected function existingLanguages()

    {

        return collect($this->files->directories(getcwd().'/resources/lang'))

            ->map(function ($dir) {

                return basename($dir);

            })
<?php     protected function reviewStringFile($lang)

    {

        $path = "resources/lang/$lang.json";

        $fullPath = getcwd().'/'.$path;



        throw_if(! $this->files->exists($fullPath), new \Exception("$path does not exist."));