-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
77 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of Chevere. | ||
* | ||
* (c) Rodolfo Berrios <rodolfo@chevere.org> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
foreach (['/../', '/../../../../'] as $path) { | ||
$autoload = __DIR__ . $path . 'vendor/autoload.php'; | ||
if (stream_resolve_include_path($autoload)) { | ||
require $autoload; | ||
|
||
break; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of Chevere. | ||
* | ||
* (c) Rodolfo Berrios <rodolfo@chevere.org> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
require 'autoload.php'; | ||
|
||
/** | ||
* Mimic xdebug var_dump example to showcase Chevere's VarDump. | ||
* https://xdebug.org/docs/develop#improved_var_dump | ||
*/ | ||
|
||
class test | ||
{ | ||
public self $pub; | ||
|
||
protected $prot = 42; | ||
|
||
private $priv = true; | ||
|
||
public function __construct() | ||
{ | ||
$this->pub = $this; | ||
} | ||
} | ||
|
||
$array = [ | ||
'one' => 'a somewhat long string!', | ||
'two' => [ | ||
'two.one' => [ | ||
'two.one.zero' => 210, | ||
'two.one.one' => [ | ||
'two.one.one.zero' => M_PI, | ||
'two.one.one.one' => 2.7, | ||
], | ||
], | ||
], | ||
'three' => new test(), | ||
'four' => range(0, 5), | ||
]; | ||
|
||
vdd($array); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters