PHP-Дайджест № 133 (10 – 24 июня 2018)

f2264fa13d9a64fce5c6294640984a74.jpg
switch ($a) {
  case FOO:
      // Works exactly as current behavior.
      break;
  case == FOO:
     // Nearly identical, though we don't use the ZEND_CASE optimization.
     // Can probably make this equivalent to `case FOO`, but it felt like an interesting direction.
     break;
  case === FOO:
     // Only triggers if `$a === FOO`, no type juggling
     break;
}

© Habrahabr.ru