Notice: Use of undefined constant ENT_HTML5 - assumed 'ENT_HTML5'
问题 I am trying to create a simple method which accepts the parameters for htmlspecialchars. Although I am getting PHP notice: Use of undefined constant ENT_HTML5 - assumed 'ENT_HTML5' Any ideas what could be causing this? /** * Encode string. * * @param array/string $value * @param string $param * @return string */ protected function escape($mixed, $params) { $defaults = array('flags' => ENT_QUOTES | ENT_HTML5, 'charset' => 'UTF-8'); $params = array_merge($defaults, $params); if (is_array($mixed