Когда я делаю print_r на созданном объекте, я получаю результат ниже. Как извлечь значение 2012 года из этого объекта? Так что я могу сравнить его с 2020, например, < /p>
Laminas\Validator\ValidatorChain Object ( [plugins:protected] => [validators:protected] => Laminas\Stdlib\PriorityQueue Object ( [queueClass:protected] => Laminas\Stdlib\SplPriorityQueue [items:protected] => Array ( [0] => Array ( [data] => Array ( [instance] => Laminas\Validator\NumberComparison Object ( [value:protected] => 2012 [abstractOptions:protected] => Array ( [messages] => Array ( ) [messageTemplates] => Array ( [notNumeric] => Expected a numeric value [notGreaterInclusive] => Values must be greater than or equal to %min%. Received "%value%" [notGreater] => Values must be greater than %min%. Received "%value% [notLessInclusive] => Values must be less than or equal to %max%. Received "%value%" [notLess] => Values must be less than %max%. Received "%value%" ) [messageVariables] => Array ( [min] => Array ( [options] => min ) [max] => Array ( [options] => max ) ) [translator] => [translatorTextDomain] => [translatorEnabled] => 1 [valueObscured] => ) [messageTemplates:protected] => Array ( [notNumeric] => Expected a numeric value [notGreaterInclusive] => Values must be greater than or equal to %min%. Received "%value%" [notGreater] => Values must be greater than %min%. Received "%value% [notLessInclusive] => Values must be less than or equal to %max%. Received "%value%" [notLess] => Values must be less than %max%. Received "%value%" ) [messageVariables:protected] => Array ( [min] => Array ( [options] => min ) [max] => Array ( [options] => max ) ) [options:protected] => Array ( [min] => 1950 [max] => 2025 [inclusiveMin] => 1 [inclusiveMax] => 1 ) ) [breakChainOnFailure] => 1 ) [priority] => 1 ) ) [queue:protected] => Laminas\Stdlib\SplPriorityQueue Object ( [serial:protected] => 9223372036854775806 [flags:SplPriorityQueue:private] => 1 [isCorrupted:SplPriorityQueue:private] => [heap:SplPriorityQueue:private] => Array ( [0] => Array ( [data] => Array ( [instance] => Laminas\Validator\NumberComparison Object ( [value:protected] => 2012 [abstractOptions:protected] => Array ( [messages] => Array ( ) [messageTemplates] => Array ( [notNumeric] => Expected a numeric value [notGreaterInclusive] => Values must be greater than or equal to %min%. Received "%value%" [notGreater] => Values must be greater than %min%. Received "%value% [notLessInclusive] => Values must be less than or equal to %max%. Received "%value%" [notLess] => Values must be less than %max%. Received "%value%" ) [messageVariables] => Array ( [min] => Array ( [options] => min ) [max] => Array ( [options] => max ) ) [translator] => [translatorTextDomain] => [translatorEnabled] => 1 [valueObscured] => ) [messageTemplates:protected] => Array ( [notNumeric] => Expected a numeric value [notGreaterInclusive] => Values must be greater than or equal to %min%. Received "%value%" [notGreater] => Values must be greater than %min%. Received "%value% [notLessInclusive] => Values must be less than or equal to %max%. Received "%value%" [notLess] => Values must be less than %max%. Received "%value%" ) [messageVariables:protected] => Array ( [min] => Array ( [options] => min ) [max] => Array ( [options] => max ) ) [options:protected] => Array ( [min] => 1950 [max] => 2025 [inclusiveMin] => 1 [inclusiveMax] => 1 ) ) [breakChainOnFailure] => 1 ) [priority] => Array ( [0] => 1 [1] => 9223372036854775807 ) ) ) ) ) [messages:protected] => Array ( ) )
Подробнее здесь: https://stackoverflow.com/questions/796 ... php-object
Получите значение Out Op PHP объект [Duplicate] ⇐ Php
Кемеровские программисты php общаются здесь
-
Anonymous
1749292422
Anonymous
Когда я делаю print_r на созданном объекте, я получаю результат ниже. Как извлечь значение 2012 года из этого объекта? Так что я могу сравнить его с 2020, например, < /p>
Laminas\Validator\ValidatorChain Object ( [plugins:protected] => [validators:protected] => Laminas\Stdlib\PriorityQueue Object ( [queueClass:protected] => Laminas\Stdlib\SplPriorityQueue [items:protected] => Array ( [0] => Array ( [data] => Array ( [instance] => Laminas\Validator\NumberComparison Object ( [value:protected] => 2012 [abstractOptions:protected] => Array ( [messages] => Array ( ) [messageTemplates] => Array ( [notNumeric] => Expected a numeric value [notGreaterInclusive] => Values must be greater than or equal to %min%. Received "%value%" [notGreater] => Values must be greater than %min%. Received "%value% [notLessInclusive] => Values must be less than or equal to %max%. Received "%value%" [notLess] => Values must be less than %max%. Received "%value%" ) [messageVariables] => Array ( [min] => Array ( [options] => min ) [max] => Array ( [options] => max ) ) [translator] => [translatorTextDomain] => [translatorEnabled] => 1 [valueObscured] => ) [messageTemplates:protected] => Array ( [notNumeric] => Expected a numeric value [notGreaterInclusive] => Values must be greater than or equal to %min%. Received "%value%" [notGreater] => Values must be greater than %min%. Received "%value% [notLessInclusive] => Values must be less than or equal to %max%. Received "%value%" [notLess] => Values must be less than %max%. Received "%value%" ) [messageVariables:protected] => Array ( [min] => Array ( [options] => min ) [max] => Array ( [options] => max ) ) [options:protected] => Array ( [min] => 1950 [max] => 2025 [inclusiveMin] => 1 [inclusiveMax] => 1 ) ) [breakChainOnFailure] => 1 ) [priority] => 1 ) ) [queue:protected] => Laminas\Stdlib\SplPriorityQueue Object ( [serial:protected] => 9223372036854775806 [flags:SplPriorityQueue:private] => 1 [isCorrupted:SplPriorityQueue:private] => [heap:SplPriorityQueue:private] => Array ( [0] => Array ( [data] => Array ( [instance] => Laminas\Validator\NumberComparison Object ( [value:protected] => 2012 [abstractOptions:protected] => Array ( [messages] => Array ( ) [messageTemplates] => Array ( [notNumeric] => Expected a numeric value [notGreaterInclusive] => Values must be greater than or equal to %min%. Received "%value%" [notGreater] => Values must be greater than %min%. Received "%value% [notLessInclusive] => Values must be less than or equal to %max%. Received "%value%" [notLess] => Values must be less than %max%. Received "%value%" ) [messageVariables] => Array ( [min] => Array ( [options] => min ) [max] => Array ( [options] => max ) ) [translator] => [translatorTextDomain] => [translatorEnabled] => 1 [valueObscured] => ) [messageTemplates:protected] => Array ( [notNumeric] => Expected a numeric value [notGreaterInclusive] => Values must be greater than or equal to %min%. Received "%value%" [notGreater] => Values must be greater than %min%. Received "%value% [notLessInclusive] => Values must be less than or equal to %max%. Received "%value%" [notLess] => Values must be less than %max%. Received "%value%" ) [messageVariables:protected] => Array ( [min] => Array ( [options] => min ) [max] => Array ( [options] => max ) ) [options:protected] => Array ( [min] => 1950 [max] => 2025 [inclusiveMin] => 1 [inclusiveMax] => 1 ) ) [breakChainOnFailure] => 1 ) [priority] => Array ( [0] => 1 [1] => 9223372036854775807 ) ) ) ) ) [messages:protected] => Array ( ) )
Подробнее здесь: [url]https://stackoverflow.com/questions/79656857/get-value-out-op-php-object[/url]
Ответить
1 сообщение
• Страница 1 из 1
Перейти
- Кемерово-IT
- ↳ Javascript
- ↳ C#
- ↳ JAVA
- ↳ Elasticsearch aggregation
- ↳ Python
- ↳ Php
- ↳ Android
- ↳ Html
- ↳ Jquery
- ↳ C++
- ↳ IOS
- ↳ CSS
- ↳ Excel
- ↳ Linux
- ↳ Apache
- ↳ MySql
- Детский мир
- Для души
- ↳ Музыкальные инструменты даром
- ↳ Печатная продукция даром
- Внешняя красота и здоровье
- ↳ Одежда и обувь для взрослых даром
- ↳ Товары для здоровья
- ↳ Физкультура и спорт
- Техника - даром!
- ↳ Автомобилистам
- ↳ Компьютерная техника
- ↳ Плиты: газовые и электрические
- ↳ Холодильники
- ↳ Стиральные машины
- ↳ Телевизоры
- ↳ Телефоны, смартфоны, плашеты
- ↳ Швейные машинки
- ↳ Прочая электроника и техника
- ↳ Фототехника
- Ремонт и интерьер
- ↳ Стройматериалы, инструмент
- ↳ Мебель и предметы интерьера даром
- ↳ Cантехника
- Другие темы
- ↳ Разное даром
- ↳ Давай меняться!
- ↳ Отдам\возьму за копеечку
- ↳ Работа и подработка в Кемерове
- ↳ Давай с тобой поговорим...
Мобильная версия