Skip to content

Instantly share code, notes, and snippets.

@edudobay
Created June 12, 2019 00:36
Show Gist options
  • Save edudobay/8da9e26d5720798cc76fc7e85b5b735e to your computer and use it in GitHub Desktop.
Save edudobay/8da9e26d5720798cc76fc7e85b5b735e to your computer and use it in GitHub Desktop.
Demonstrate namespace shadowing by PsySH
{
"name": "example/psysh-imports-shadow-namespaces",
"require": {
"nesbot/carbon": "^2.19",
"psy/psysh": "^0.9.9"
}
}
<?php
use Carbon\Carbon;
use Carbon\CarbonTimeZone;
require_once 'vendor/autoload.php';
$tz = new CarbonTimeZone('UTC');
$datetime = Carbon::today($tz);
print_r($datetime);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment