PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php function bool2str($bool) { if ($bool === false) { return 'FALSE'; } else { return 'TRUE'; } } class word { public int $symbol_id; public string|null $word; public string $language_code; public string $country_code = 'UND'; } $word1 = new word(); $reflection = new ReflectionClass('word'); $property = $reflection->getProperty('word'); echo ($property->getType()->getName()); //echo (is_null($word1->$word));
Show:  
Copy Clear