Supported Versions: PHP 5 >= 5.2.0, PHP 7, PHP 8
Return hash id for given object
<?php spl_object_hash(object $object): string
<?php $app['router']->get('/first', function (Application $app) {
return [
'app' => spl_object_hash($app),
'state' => spl_object_hash($app->make(GenericObject::class)->state),
];
});
<?php $app['router']->get('/first', function (Application $app) {
return [
'app' => spl_object_hash($app),
'state' => spl_object_hash($app->make(GenericObject::class)->state),
];
});
<?php $app['router']->get('/first', function (Application $app) {
return [
'app' => spl_object_hash($app),
'state' => spl_object_hash($app->make(GenericObject::class)->state),
];
});
<?php $app['router']->get('/first', function (Application $app) {
return [
'app' => spl_object_hash($app),
'state' => spl_object_hash($app->make(GenericObject::class)->state),
];
});
<?php $app['router']->get('/first', function (Application $app) {
return [
'app' => spl_object_hash($app),
'state' => spl_object_hash($app->make(GenericObject::class)->state),
];
});
<?php $app['router']->get('/first', function (Application $app) {
return [
'app' => spl_object_hash($app),
'state' => spl_object_hash($app->make(GenericObject::class)->state),
];
});
<?php $app['router']->get('/first', function (Application $app) {
return [
'app' => spl_object_hash($app),
'state' => spl_object_hash($app->make(GenericObject::class)->state),
];
});
<?php $app['router']->get('/first', function (Application $app) {
return [
'app' => spl_object_hash($app),
'state' => spl_object_hash($app->make(GenericObject::class)->state),
];
});
<?php $app['router']->get('/first', function (Application $app) {
return [
'name' => $app[BroadcastManager::class]->getApplication()['request']->query('name'),
'hash' => spl_object_hash($app[BroadcastManager::class]->getApplication()),
];
});
<?php $app['mail.manager'];
$app['router']->get('/first', function (Application $app) {
return spl_object_hash($app['mail.manager']->getApplication());
});
$worker->run();
<?php $app[ChannelManager::class];
$app['router']->get('/first', function (Application $app) {
return spl_object_hash($app[ChannelManager::class]->getContainer());
});
$worker->run();
<?php $app[Hub::class];
$app['router']->get('/first', function (Application $app) {
return spl_object_hash($app[Hub::class]->getContainer());
});
$worker->run();
<?php $app['queue']->connection('sync');
$app['router']->get('/first', function (Application $app) {
return spl_object_hash($app['queue']->connection('sync')->getContainer());
});
$worker->run();
<?php $app['router']->get('/first', function (RequestStateTestFormRequest $request) {
return [
'name' => $request->query('name'),
'container' => spl_object_hash($request->getContainer()),
];
});
<?php $app['validator'];
$app['router']->get('/first', function (Application $app) {
return spl_object_hash($app['validator']->getContainer());
});
$worker->run();