Advertisement
Guest User

Untitled

a guest
Oct 26th, 2015
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. <?php
  2.  
  3. function check_types($types) {
  4.  
  5. foreach($type as $key => $value) {
  6. foreach ($value as $val) {
  7. if ($key == gettype($val)) {
  8.  
  9. }
  10. return true;
  11. }
  12. }
  13.  
  14.  
  15.  
  16. $tab = ["integer"=> [5121,454, -5464],
  17. "double" => [22.0, 262.65, -54.54],
  18. "NULL" => [NULL, NULL, NULL],
  19. "string" => ["a", "a", "ab"],
  20. "object" => [new stdClass()]];
  21.  
  22. var_dump(check_types($tab));
  23.  
  24. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement