{"id":232,"date":"2009-01-29T00:24:37","date_gmt":"2009-01-28T23:24:37","guid":{"rendered":"http:\/\/bezerik.es\/me\/?p=232"},"modified":"2009-01-29T13:36:59","modified_gmt":"2009-01-29T12:36:59","slug":"phpinfo2array-convierte-la-salida-de-phpinfo-en-una-array","status":"publish","type":"post","link":"http:\/\/bezerik.es\/me\/phpinfo2array-convierte-la-salida-de-phpinfo-en-una-array\/","title":{"rendered":"phpinfo2array: Convierte la salida de phpinfo() en una array"},"content":{"rendered":"<p>Rebuscando entre la documentaci\u00f3n de <strong>PHP<\/strong> y mas concretamente entre los comentarios de los usuarios, encuentro esta pedazo funci\u00f3n que a simple vista me ha encantado y que a partir de ahora voy a tener presente en la mayoria de mis proyectos (ya le encontrar\u00e9 una utilidad).<\/p>\n<h2>\u00bfQue es <strong>phpinfo2array<\/strong>?<\/h2>\n<p>Es una funci\u00f3n que convierte la salida de <strong>phpinfo()<\/strong> en una array.<!--more--><\/p>\n<pre class=\"code\"><span style=\"color: rgb(0, 0, 0);\">&lt;<\/span>?php\r\n<span style=\"color: rgb(113, 122, 179);\">\/***<\/span>\r\n<span style=\"color: rgb(113, 122, 179);\"> * phpinfo2array: Convierte la salida de phpinfo() en una array.<\/span>\r\n<span style=\"color: rgb(113, 122, 179);\"> * http:\/\/bezerik.es\/me\/phpinfo2array-convierte-la-salida-de-phpinfo-en-una-array\/<\/span>\r\n<span style=\"color: rgb(113, 122, 179);\"> *<\/span>\r\n<span style=\"color: rgb(113, 122, 179);\"> * Thanks to webmaster at askapache dot com and more others.<\/span>\r\n<span style=\"color: rgb(113, 122, 179);\"> * More info at http:\/\/es2.php.net\/phpinfo<\/span>\r\n<span style=\"color: rgb(113, 122, 179);\"> *\/<\/span>\r\n<span style=\"color: rgb(127, 0, 85); font-weight: bold;\">function<\/span> phpinfo2array<span style=\"color: rgb(0, 0, 0);\">(<\/span><span style=\"color: rgb(127, 0, 85); font-weight: bold;\">$return<\/span><span style=\"color: rgb(0, 0, 0);\">=<\/span>false<span style=\"color: rgb(0, 0, 0);\">){<\/span>\r\n\t<span style=\"color: rgb(113, 122, 179);\">\/* Andale!  Andale!  Yee-Hah! *\/<\/span>\r\n\t<span style=\"color: rgb(127, 0, 85); font-weight: bold;\">ob_start<\/span><span style=\"color: rgb(0, 0, 0);\">();<\/span>\r\n\r\n\t<span style=\"color: rgb(127, 0, 85); font-weight: bold;\">phpinfo<\/span><span style=\"color: rgb(0, 0, 0);\">(-<\/span><span style=\"color: rgb(0, 0, 0);\">1<\/span><span style=\"color: rgb(0, 0, 0);\">);<\/span>\r\n\t<span style=\"color: rgb(127, 0, 85); font-weight: bold;\">$pi<\/span> <span style=\"color: rgb(0, 0, 0);\">=<\/span> <span style=\"color: rgb(127, 0, 85); font-weight: bold;\">preg_replace<\/span><span style=\"color: rgb(0, 0, 0);\">(<\/span>\r\n\t\t<span style=\"color: rgb(127, 0, 85); font-weight: bold;\">array<\/span><span style=\"color: rgb(0, 0, 0);\">(<\/span><span style=\"color: rgb(0, 0, 255);\">'#^.*&lt;body&gt;(.*)&lt;\/body&gt;.*$#ms'<\/span><span style=\"color: rgb(0, 0, 0);\">,<\/span> <span style=\"color: rgb(0, 0, 255);\">'#&lt;h2&gt;PHP License&lt;\/h2&gt;.*$#ms'<\/span><span style=\"color: rgb(0, 0, 0);\">,<\/span>\r\n\t\t\t<span style=\"color: rgb(0, 0, 255);\">'#&lt;h1&gt;Configuration&lt;\/h1&gt;#'<\/span><span style=\"color: rgb(0, 0, 0);\">,<\/span>  <span style=\"color: rgb(0, 0, 255);\">\"#<\/span><span style=\"color: rgb(0, 0, 255);\">\\r<\/span><span style=\"color: rgb(0, 0, 255);\">?<\/span><span style=\"color: rgb(0, 0, 255);\">\\n<\/span><span style=\"color: rgb(0, 0, 255);\">#\"<\/span><span style=\"color: rgb(0, 0, 0);\">,<\/span> <span style=\"color: rgb(0, 0, 255);\">\"#&lt;\/(h1|h2|h3|tr)&gt;#\"<\/span><span style=\"color: rgb(0, 0, 0);\">,<\/span> <span style=\"color: rgb(0, 0, 255);\">'# +&lt;#'<\/span><span style=\"color: rgb(0, 0, 0);\">,<\/span>\r\n\t\t\t<span style=\"color: rgb(0, 0, 255);\">\"#[<\/span> <span style=\"color: rgb(0, 0, 255);\">\\t<\/span><span style=\"color: rgb(0, 0, 255);\">]+#\"<\/span><span style=\"color: rgb(0, 0, 0);\">,<\/span> <span style=\"color: rgb(0, 0, 255);\">'# #'<\/span><span style=\"color: rgb(0, 0, 0);\">,<\/span> <span style=\"color: rgb(0, 0, 255);\">'#  +#'<\/span><span style=\"color: rgb(0, 0, 0);\">,<\/span> <span style=\"color: rgb(0, 0, 255);\">'# class=\".*?\"#'<\/span><span style=\"color: rgb(0, 0, 0);\">,<\/span> <span style=\"color: rgb(0, 0, 255);\">'%'<\/span>%<span style=\"color: rgb(0, 0, 255);\">',<\/span>\r\n\t\t\t<span style=\"color: rgb(0, 0, 255);\">  '<\/span><span style=\"color: rgb(47, 153, 86);\">#&lt;tr&gt;(?:.*?)\" src=\"(?:.*?)=(.*?)\" alt=\"PHP Logo\" \/&gt;&lt;\/a&gt;'<\/span>\r\n\t\t\t.<span style=\"color: rgb(0, 0, 255);\">'&lt;h1&gt;PHP Version (.*?)&lt;\/h1&gt;(?:<\/span><span style=\"color: rgb(0, 0, 255);\">\\n<\/span><span style=\"color: rgb(0, 0, 255);\">+?)&lt;\/td&gt;&lt;\/tr&gt;#'<\/span><span style=\"color: rgb(0, 0, 0);\">,<\/span>\r\n\t\t\t<span style=\"color: rgb(0, 0, 255);\">'#&lt;h1&gt;&lt;a href=\"(?:.*?)<\/span><span style=\"color: rgb(0, 0, 255);\">\\?<\/span><span style=\"color: rgb(0, 0, 255);\">=(.*?)\"&gt;PHP Credits&lt;\/a&gt;&lt;\/h1&gt;#'<\/span><span style=\"color: rgb(0, 0, 0);\">,<\/span>\r\n\t\t\t<span style=\"color: rgb(0, 0, 255);\">'#&lt;tr&gt;(?:.*?)\" src=\"(?:.*?)=(.*?)\"(?:.*?)Zend Engine (.*?),(?:.*?)&lt;\/tr&gt;#'<\/span><span style=\"color: rgb(0, 0, 0);\">,<\/span>\r\n\t\t\t<span style=\"color: rgb(0, 0, 255);\">\"# +#\"<\/span><span style=\"color: rgb(0, 0, 0);\">,<\/span> <span style=\"color: rgb(0, 0, 255);\">'#&lt;tr&gt;#'<\/span><span style=\"color: rgb(0, 0, 0);\">,<\/span> <span style=\"color: rgb(0, 0, 255);\">'#&lt;\/tr&gt;#'<\/span><span style=\"color: rgb(0, 0, 0);\">),<\/span>\r\n\t\t<span style=\"color: rgb(127, 0, 85); font-weight: bold;\">array<\/span><span style=\"color: rgb(0, 0, 0);\">(<\/span><span style=\"color: rgb(0, 0, 255);\">'$1'<\/span><span style=\"color: rgb(0, 0, 0);\">,<\/span> <span style=\"color: rgb(0, 0, 255);\">''<\/span><span style=\"color: rgb(0, 0, 0);\">,<\/span> <span style=\"color: rgb(0, 0, 255);\">''<\/span><span style=\"color: rgb(0, 0, 0);\">,<\/span> <span style=\"color: rgb(0, 0, 255);\">''<\/span><span style=\"color: rgb(0, 0, 0);\">,<\/span> <span style=\"color: rgb(0, 0, 255);\">'&lt;\/$1&gt;'<\/span> . <span style=\"color: rgb(0, 0, 255);\">\"<\/span><span style=\"color: rgb(0, 0, 255);\">\\n<\/span><span style=\"color: rgb(0, 0, 255);\">\"<\/span><span style=\"color: rgb(0, 0, 0);\">,<\/span> <span style=\"color: rgb(0, 0, 255);\">'&lt;'<\/span><span style=\"color: rgb(0, 0, 0);\">,<\/span> <span style=\"color: rgb(0, 0, 255);\">' '<\/span><span style=\"color: rgb(0, 0, 0);\">,<\/span> <span style=\"color: rgb(0, 0, 255);\">' '<\/span><span style=\"color: rgb(0, 0, 0);\">,<\/span> <span style=\"color: rgb(0, 0, 255);\">' '<\/span><span style=\"color: rgb(0, 0, 0);\">,<\/span> <span style=\"color: rgb(0, 0, 255);\">''<\/span><span style=\"color: rgb(0, 0, 0);\">,<\/span> <span style=\"color: rgb(0, 0, 255);\">' '<\/span><span style=\"color: rgb(0, 0, 0);\">,<\/span>\r\n\t\t\t<span style=\"color: rgb(0, 0, 255);\">'&lt;h2&gt;PHP Configuration&lt;\/h2&gt;'<\/span>.<span style=\"color: rgb(0, 0, 255);\">\"<\/span><span style=\"color: rgb(0, 0, 255);\">\\n<\/span><span style=\"color: rgb(0, 0, 255);\">\"<\/span>.<span style=\"color: rgb(0, 0, 255);\">'&lt;tr&gt;&lt;td&gt;PHP Version&lt;\/td&gt;&lt;td&gt;$2&lt;\/td&gt;&lt;\/tr&gt;'<\/span>.\r\n\t\t\t<span style=\"color: rgb(0, 0, 255);\">\"<\/span><span style=\"color: rgb(0, 0, 255);\">\\n<\/span><span style=\"color: rgb(0, 0, 255);\">\"<\/span>.<span style=\"color: rgb(0, 0, 255);\">'&lt;tr&gt;&lt;td&gt;PHP Egg&lt;\/td&gt;&lt;td&gt;$1&lt;\/td&gt;&lt;\/tr&gt;'<\/span><span style=\"color: rgb(0, 0, 0);\">,<\/span>\r\n\t\t\t<span style=\"color: rgb(0, 0, 255);\">'&lt;tr&gt;&lt;td&gt;PHP Credits Egg&lt;\/td&gt;&lt;td&gt;$1&lt;\/td&gt;&lt;\/tr&gt;'<\/span><span style=\"color: rgb(0, 0, 0);\">,<\/span>\r\n\t\t\t<span style=\"color: rgb(0, 0, 255);\">'&lt;tr&gt;&lt;td&gt;Zend Engine&lt;\/td&gt;&lt;td&gt;$2&lt;\/td&gt;&lt;\/tr&gt;'<\/span> . <span style=\"color: rgb(0, 0, 255);\">\"<\/span><span style=\"color: rgb(0, 0, 255);\">\\n<\/span><span style=\"color: rgb(0, 0, 255);\">\"<\/span> .\r\n\t\t\t<span style=\"color: rgb(0, 0, 255);\">'&lt;tr&gt;&lt;td&gt;Zend Egg&lt;\/td&gt;&lt;td&gt;$1&lt;\/td&gt;&lt;\/tr&gt;'<\/span><span style=\"color: rgb(0, 0, 0);\">,<\/span> <span style=\"color: rgb(0, 0, 255);\">' '<\/span><span style=\"color: rgb(0, 0, 0);\">,<\/span> <span style=\"color: rgb(0, 0, 255);\">'%S%'<\/span><span style=\"color: rgb(0, 0, 0);\">,<\/span> <span style=\"color: rgb(0, 0, 255);\">'%E%'<\/span><span style=\"color: rgb(0, 0, 0);\">),<\/span>\r\n\t\tob_get_clean<span style=\"color: rgb(0, 0, 0);\">());<\/span>\r\n\r\n\t<span style=\"color: rgb(127, 0, 85); font-weight: bold;\">$sections<\/span> <span style=\"color: rgb(0, 0, 0);\">=<\/span> <span style=\"color: rgb(127, 0, 85); font-weight: bold;\">explode<\/span><span style=\"color: rgb(0, 0, 0);\">(<\/span><span style=\"color: rgb(0, 0, 255);\">'&lt;h2&gt;'<\/span><span style=\"color: rgb(0, 0, 0);\">,<\/span> <span style=\"color: rgb(127, 0, 85); font-weight: bold;\">strip_tags<\/span><span style=\"color: rgb(0, 0, 0);\">(<\/span><span style=\"color: rgb(127, 0, 85); font-weight: bold;\">$pi<\/span><span style=\"color: rgb(0, 0, 0);\">,<\/span> <span style=\"color: rgb(0, 0, 255);\">'&lt;h2&gt;&lt;th&gt;&lt;td&gt;'<\/span><span style=\"color: rgb(0, 0, 0);\">));<\/span>\r\n\t<span style=\"color: rgb(127, 0, 85); font-weight: bold;\">unset<\/span><span style=\"color: rgb(0, 0, 0);\">(<\/span><span style=\"color: rgb(127, 0, 85); font-weight: bold;\">$sections<\/span><span style=\"color: rgb(0, 0, 0);\">[<\/span><span style=\"color: rgb(0, 0, 0);\">0<\/span><span style=\"color: rgb(0, 0, 0);\">]);<\/span>\r\n\r\n\t<span style=\"color: rgb(127, 0, 85); font-weight: bold;\">$pi<\/span> <span style=\"color: rgb(0, 0, 0);\">=<\/span> <span style=\"color: rgb(127, 0, 85); font-weight: bold;\">array<\/span><span style=\"color: rgb(0, 0, 0);\">();<\/span>\r\n\t<span style=\"color: rgb(127, 0, 85); font-weight: bold;\">foreach<\/span><span style=\"color: rgb(0, 0, 0);\">(<\/span><span style=\"color: rgb(127, 0, 85); font-weight: bold;\">$sections<\/span> as <span style=\"color: rgb(127, 0, 85); font-weight: bold;\">$section<\/span><span style=\"color: rgb(0, 0, 0);\">){<\/span>\r\n\t\t<span style=\"color: rgb(127, 0, 85); font-weight: bold;\">$n<\/span> <span style=\"color: rgb(0, 0, 0);\">=<\/span> <span style=\"color: rgb(127, 0, 85); font-weight: bold;\">substr<\/span><span style=\"color: rgb(0, 0, 0);\">(<\/span><span style=\"color: rgb(127, 0, 85); font-weight: bold;\">$section<\/span><span style=\"color: rgb(0, 0, 0);\">,<\/span> <span style=\"color: rgb(0, 0, 0);\">0<\/span><span style=\"color: rgb(0, 0, 0);\">,<\/span> <span style=\"color: rgb(127, 0, 85); font-weight: bold;\">strpos<\/span><span style=\"color: rgb(0, 0, 0);\">(<\/span><span style=\"color: rgb(127, 0, 85); font-weight: bold;\">$section<\/span><span style=\"color: rgb(0, 0, 0);\">,<\/span> <span style=\"color: rgb(0, 0, 255);\">'&lt;\/h2&gt;'<\/span><span style=\"color: rgb(0, 0, 0);\">));<\/span>\r\n\t\t<span style=\"color: rgb(127, 0, 85); font-weight: bold;\">preg_match_all<\/span><span style=\"color: rgb(0, 0, 0);\">(<\/span>\r\n\t\t\t<span style=\"color: rgb(0, 0, 255);\">'#%S%(?:&lt;td&gt;(.*?)&lt;\/td&gt;)?(?:&lt;td&gt;(.*?)&lt;\/td&gt;)?(?:&lt;td&gt;(.*?)&lt;\/td&gt;)?%E%#'<\/span><span style=\"color: rgb(0, 0, 0);\">,<\/span>\r\n\t\t\t<span style=\"color: rgb(127, 0, 85); font-weight: bold;\">$section<\/span><span style=\"color: rgb(0, 0, 0);\">,<\/span> <span style=\"color: rgb(127, 0, 85); font-weight: bold;\">$askapache<\/span><span style=\"color: rgb(0, 0, 0);\">,<\/span> PREG_SET_ORDER<span style=\"color: rgb(0, 0, 0);\">);<\/span>\r\n\t\t<span style=\"color: rgb(127, 0, 85); font-weight: bold;\">foreach<\/span><span style=\"color: rgb(0, 0, 0);\">(<\/span><span style=\"color: rgb(127, 0, 85); font-weight: bold;\">$askapache<\/span> as <span style=\"color: rgb(127, 0, 85); font-weight: bold;\">$m<\/span><span style=\"color: rgb(0, 0, 0);\">)<\/span>\r\n\t\t\t<span style=\"color: rgb(127, 0, 85); font-weight: bold;\">$pi<\/span><span style=\"color: rgb(0, 0, 0);\">[<\/span><span style=\"color: rgb(127, 0, 85); font-weight: bold;\">$n<\/span><span style=\"color: rgb(0, 0, 0);\">][<\/span><span style=\"color: rgb(127, 0, 85); font-weight: bold;\">$m<\/span><span style=\"color: rgb(0, 0, 0);\">[<\/span><span style=\"color: rgb(0, 0, 0);\">1<\/span><span style=\"color: rgb(0, 0, 0);\">]]=(!<\/span>isset<span style=\"color: rgb(0, 0, 0);\">(<\/span><span style=\"color: rgb(127, 0, 85); font-weight: bold;\">$m<\/span><span style=\"color: rgb(0, 0, 0);\">[<\/span><span style=\"color: rgb(0, 0, 0);\">3<\/span><span style=\"color: rgb(0, 0, 0);\">])||<\/span><span style=\"color: rgb(127, 0, 85); font-weight: bold;\">$m<\/span><span style=\"color: rgb(0, 0, 0);\">[<\/span><span style=\"color: rgb(0, 0, 0);\">2<\/span><span style=\"color: rgb(0, 0, 0);\">]==<\/span><span style=\"color: rgb(127, 0, 85); font-weight: bold;\">$m<\/span><span style=\"color: rgb(0, 0, 0);\">[<\/span><span style=\"color: rgb(0, 0, 0);\">3<\/span><span style=\"color: rgb(0, 0, 0);\">])<\/span>?<span style=\"color: rgb(127, 0, 85); font-weight: bold;\">$m<\/span><span style=\"color: rgb(0, 0, 0);\">[<\/span><span style=\"color: rgb(0, 0, 0);\">2<\/span><span style=\"color: rgb(0, 0, 0);\">]:<\/span><span style=\"color: rgb(127, 0, 85); font-weight: bold;\">array_slice<\/span><span style=\"color: rgb(0, 0, 0);\">(<\/span><span style=\"color: rgb(127, 0, 85); font-weight: bold;\">$m<\/span><span style=\"color: rgb(0, 0, 0);\">,<\/span><span style=\"color: rgb(0, 0, 0);\">2<\/span><span style=\"color: rgb(0, 0, 0);\">);<\/span>\r\n\t<span style=\"color: rgb(0, 0, 0);\">}<\/span>\r\n\r\n\t<span style=\"color: rgb(127, 0, 85); font-weight: bold;\">return<\/span> <span style=\"color: rgb(0, 0, 0);\">(<\/span><span style=\"color: rgb(127, 0, 85); font-weight: bold;\">$return<\/span> <span style=\"color: rgb(0, 0, 0);\">===<\/span> false<span style=\"color: rgb(0, 0, 0);\">)<\/span> ? <span style=\"color: rgb(127, 0, 85); font-weight: bold;\">print_r<\/span><span style=\"color: rgb(0, 0, 0);\">(<\/span><span style=\"color: rgb(127, 0, 85); font-weight: bold;\">$pi<\/span><span style=\"color: rgb(0, 0, 0);\">) :<\/span> <span style=\"color: rgb(127, 0, 85); font-weight: bold;\">$pi<\/span><span style=\"color: rgb(0, 0, 0);\">;<\/span>\r\n<span style=\"color: rgb(0, 0, 0);\">}<\/span>\r\n?<span style=\"color: rgb(0, 0, 0);\">&gt;<\/span><\/pre>\n<h2>Ejemplos de uso de phpinfo2array<\/h2>\n<p>Si llamais a esta funci\u00f3n sin par\u00e1metros imprimir\u00e1 la matriz por pantalla: <a href=\"http:\/\/bezerik.es\/online\/phpinfo2array.html\" target=\"_blank\">Ver resultado de ejemplo<\/a>.<\/p>\n<pre class=\"code\">&lt;?\r\nphpinfo2array();\r\n?&gt;<\/pre>\n<p>En cambio, devolver\u00e1 la array para vuestro propio uso si la llamais de la siguiente manera (fijaos en el 1 como parametro de entrada).<\/p>\n<pre class=\"code\"><span style=\"color: rgb(0, 0, 0);\">&lt;<\/span>?\r\n<span style=\"color: rgb(47, 153, 86);\">\/\/ Construimos la array con toda la informaci\u00f3n que nos devuelve phpinfo().<\/span>\r\n<span style=\"color: rgb(127, 0, 85); font-weight: bold;\">$phpinfo<\/span> <span style=\"color: rgb(0, 0, 0);\">=<\/span> phpinfo2array<span style=\"color: rgb(0, 0, 0);\">(<\/span><span style=\"color: rgb(0, 0, 0);\">1<\/span><span style=\"color: rgb(0, 0, 0);\">);<\/span>\r\n\r\n<span style=\"color: rgb(47, 153, 86);\">\/\/ Por ejemplo, mostramos la versi\u00f3n de PHP.<\/span>\r\n<span style=\"color: rgb(127, 0, 85); font-weight: bold;\">echo<\/span> <span style=\"color: rgb(127, 0, 85); font-weight: bold;\">$phpinfo<\/span><span style=\"color: rgb(0, 0, 0);\">[<\/span><span style=\"color: rgb(0, 0, 255);\">'PHP Configuration'<\/span><span style=\"color: rgb(0, 0, 0);\">][<\/span><span style=\"color: rgb(0, 0, 255);\">'PHP Version'<\/span><span style=\"color: rgb(0, 0, 0);\">]<\/span>.<span style=\"color: rgb(0, 0, 255);\">\"&lt;br \/&gt;\"<\/span><span style=\"color: rgb(0, 0, 0);\">;<\/span>\r\n\r\n<span style=\"color: rgb(47, 153, 86);\">\/\/ Mostramos el correo electronico del administador del servidor web.<\/span>\r\n<span style=\"color: rgb(127, 0, 85); font-weight: bold;\">echo<\/span> <span style=\"color: rgb(127, 0, 85); font-weight: bold;\">$phpinfo<\/span><span style=\"color: rgb(0, 0, 0);\">[<\/span><span style=\"color: rgb(0, 0, 255);\">'apache2handler'<\/span><span style=\"color: rgb(0, 0, 0);\">][<\/span><span style=\"color: rgb(0, 0, 255);\">'Server Administrator'<\/span><span style=\"color: rgb(0, 0, 0);\">]<\/span>.<span style=\"color: rgb(0, 0, 255);\">\"&lt;br \/&gt;\"<\/span><span style=\"color: rgb(0, 0, 0);\">;<\/span>\r\n\r\n<span style=\"color: rgb(47, 153, 86);\">\/\/ y un largo etcera...<\/span>\r\n?<span style=\"color: rgb(0, 0, 0);\">&gt;<\/span><\/pre>\n<p>\u00a1Y todo este post ha sido creado porque me ha venido de gusto promocionarlo!<\/p>\n<p>M\u00e1s informaci\u00f3n en <a rel=\"nofollow\" href=\"http:\/\/es.php.net\/phpinfo\" target=\"_blank\">Manual phpinfo<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Rebuscando entre la documentaci\u00f3n de PHP y mas concretamente entre los comentarios de los usuarios, encuentro esta pedazo funci\u00f3n que a simple vista me ha encantado y que a partir de ahora voy a tener presente en la mayoria de mis proyectos (ya le encontrar\u00e9 una utilidad). \u00bfQue es phpinfo2array? Es una funci\u00f3n que convierte [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":654,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[25,10],"tags":[268,343,266,267],"_links":{"self":[{"href":"http:\/\/bezerik.es\/me\/wp-json\/wp\/v2\/posts\/232"}],"collection":[{"href":"http:\/\/bezerik.es\/me\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/bezerik.es\/me\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/bezerik.es\/me\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/bezerik.es\/me\/wp-json\/wp\/v2\/comments?post=232"}],"version-history":[{"count":15,"href":"http:\/\/bezerik.es\/me\/wp-json\/wp\/v2\/posts\/232\/revisions"}],"predecessor-version":[{"id":247,"href":"http:\/\/bezerik.es\/me\/wp-json\/wp\/v2\/posts\/232\/revisions\/247"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/bezerik.es\/me\/wp-json\/wp\/v2\/media\/654"}],"wp:attachment":[{"href":"http:\/\/bezerik.es\/me\/wp-json\/wp\/v2\/media?parent=232"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bezerik.es\/me\/wp-json\/wp\/v2\/categories?post=232"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bezerik.es\/me\/wp-json\/wp\/v2\/tags?post=232"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}