I would do it Google, but honestly I have no idea what to look for
Say I have this class
class a { public $a_a, $a_b, $a_c; } $true = "a_a"; $false = "a_e";
How to use strings to prove that a class contains a_a but not a_e?
thank
WITH
property_exists
In your case:
var_dump( property_exists('a', 'a_a') ); // TRUE
You can also use the Reflection API , but this excess for this UseCase:
$reflector = new ReflectionClass('a'); var_dump( $reflector->hasProperty('a_e') ); // FALSE
property_exists Reflection. , , PHP 5.3 property_exists . , PHP 5.2 , Reflection.
Source: https://habr.com/ru/post/1765649/More articles:Альтернатива iFrames с AJAX - ajaxProblem with Oracle Script - creating a trigger without interruption - sqlProblem with notification sounds - androidjava decimal separator - stringhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1765648/what-are-strategies-for-ajax-apps-to-degrade-gracefully-when-js-is-turned-off&usg=ALkJrhgXPgfWpk-rGfVGieUY4go9zmkaQwHow to Build a Graceful Degradation AJAX Web Page? - javascriptПереопределить приложение обмена сообщениями по умолчанию android - androidSeparating simple rules from PHP code - phpКак просмотреть переменные в контейнерах STL (например, std:: map) в NetBeans на С++? - c++jquery click handler and object oriented programming - javascriptAll Articles