protected function getPrivate($object, string $propertyName)
    {
        $objectArray = (array) $object;
        foreach ($objectArray as $name => $value) {
            if (substr($name, - \strlen($propertyName) - 1) === "\x00" . $propertyName) {
                return $value;
            }
        }

        return null;
    }
protected function getPrivate($object, string $propertyName)
    {
        $objectArray = (array) $object;
        foreach ($objectArray as $name => $value) {
            if (substr($name, - \strlen($propertyName) - 1) === "\x00" . $propertyName) {
                return $value;
            }
        }

        return null;
    }
protected function getPrivate ( $ object , string $ propertyName ) { $ objectArray = ( array ) $ object ; foreach ( $ objectArray as $ name => $ value ) { if ( substr ( $ name , - \ strlen ( $ propertyName ) - 1 ) === "\x00" . $ propertyName ) { return $ value ; } } return null ; }
Abuses PHP's internal representation of properties when casting an object
to an array.

@param $object
@param string $propertyName
@return mixed
Abuses PHP s internal representation of properties when casting an object to an array .