- var_dump: documentation ( source)
<?php
class Entity {}
class ShipmentEntity extends Entity
{
public ?string $salesChannelId = null;
public SalesChannelEntity $salesChannel;
}
$shipment = new ShipmentEntity();
// Sales channel was not loaded therefore the property is not initialized:
var_dump($shipment->salesChannel);
// Fatal error: Uncaught Error: Typed property ShipmentEntity::$salesChannel must not be accessed before initialization in /in/CPlqC:11