3 * Fetch the entities.json file and convert to PHP datastructure.
6 // The URL to the official entities JSON file.
7 $ENTITIES_URL = 'http://www.w3.org/TR/2012/CR-html5-20121217/entities.json';
9 $payload = file_get_contents($ENTITIES_URL);
10 $json = json_decode($payload);
13 foreach ($json as $name => $obj) {
14 $sname = substr($name, 1, -1);
15 $table[$sname] = $obj->characters;
19 namespace Masterminds\\HTML5;
20 /** Entity lookup tables. This class is automatically generated. */
22 public static $byName = ';
26 //print serialize($table);