PluginProbe
Parse.ly / 3.24.2
Parse.ly v3.24.2
3.24.2 3.24.1 3.24.0 3.23.7 3.23.6 3.23.5 3.23.4 3.23.3 3.16.0 3.16.1 3.16.2 3.16.3 3.16.4 3.17.0 3.18.0 3.18.1 3.19.0 3.19.1 3.19.2 3.19.3 3.2.0 3.2.1 3.20.0 3.20.1 3.20.2 All 106 releases
wp-parsely / vendor / masterminds / html5 / bin / entities.php

entities.php in Parse.ly 3.24.2, at vendor/masterminds/html5/bin/entities.php

27 lines 638 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Fetch the entities.json file and convert to PHP datastructure.
4 */
5
6 // The URL to the official entities JSON file.
7 $ENTITIES_URL = 'http://www.w3.org/TR/2012/CR-html5-20121217/entities.json';
8
9 $payload = file_get_contents($ENTITIES_URL);
10 $json = json_decode($payload);
11
12 $table = array();
13 foreach ($json as $name => $obj) {
14 $sname = substr($name, 1, -1);
15 $table[$sname] = $obj->characters;
16 }
17
18 echo '<?php
19 namespace Masterminds\\HTML5;
20 /** Entity lookup tables. This class is automatically generated. */
21 class Entities {
22 public static $byName = ';
23 var_export($table);
24 echo ';
25 }' . PHP_EOL;
26 //print serialize($table);
27