{"id":6957,"date":"2019-11-25T07:04:45","date_gmt":"2019-11-24T22:04:45","guid":{"rendered":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/?p=6957"},"modified":"2019-11-25T07:08:30","modified_gmt":"2019-11-24T22:08:30","slug":"6957","status":"publish","type":"post","link":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/2019\/11\/25\/6957\/","title":{"rendered":"WordPress: \u975e\u4e92\u63db\u30d7\u30e9\u30b0\u30a4\u30f3\u306ePHP7\u5bfe\u5fdc"},"content":{"rendered":"<p>\uff08<a href=\"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/2019\/11\/14\/3497\/\">\u6012\u6d9b\u306e\u3081\u3082\u3081\u3082\u30ea\u30f3\u30af\u96c6 | WordPress: PHP\u30925.6\u304b\u30897.3\u306b\u66f4\u65b0\u3057\u305f\u3089\u3001\u30d7\u30e9\u30b0\u30a4\u30f3\u30a8\u30e9\u30fc\uff12\u4ef6\u3001\u672c\u6587\u8868\u793a\u5931\u6557<\/a>\u306e\u7d9a\u304d\uff09<\/p>\n<p>PHP5\u3092PHP7\u306b\u66f4\u65b0\u3092\u884c\u306a\u3063\u305f\u3089WordPress\u304c\u52d5\u4f5c\u3057\u306a\u304f\u306a\u3063\u305f\u4ef6\u306b\u3064\u3044\u3066\u3001\u30c1\u30a7\u30c3\u30af\u3057\u3066\u307f\u308b\u3068\u4e0b\u8a18\u306e\uff12\u3064\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u306ePHP7\u3078\u306e\u975e\u4e92\u63db\u6027\u3067WordPress\u306e\u7acb\u3061\u4e0a\u3052\u81ea\u4f53\u304c\u52d5\u4f5c\u3057\u306a\u304f\u306a\u3063\u3066\u3044\u305f\u3002<\/p>\n<ul>\n<li>amazon_linkage 0.6.3||\u30ea\u30f3\u30af\u5207\u308c\n<li>php_hl_string 0.9.9||\u30ea\u30f3\u30af\u5207\u308c\n<\/ul>\n<p>php_hl_string \u306b\u3064\u3044\u3066\u306f\u3001\u4e0b\u8a18\u8a18\u4e8b\u3082\uff1a<\/p>\n<ul>\n<li><a href=\"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/2014\/06\/17\/2708\/\">\u6012\u6d9b\u306e\u3081\u3082\u3081\u3082\u30ea\u30f3\u30af\u96c6 | WordPress: \u30d7\u30e9\u30b0\u30a4\u30f3 PHP Hilight String \u304c\u306a\u304f\u306a\u3063\u3066\u3044\u308b<br \/>\n<\/a>\n<\/ul>\n<p>\u4e21\u65b9\u3068\u3082PHP7\u306e\u975e\u4e92\u63db\u6027\u306b\u95a2\u3059\u308b\u3082\u306e\u3060\u3063\u305f\u3002\u5143\u30ea\u30f3\u30af\u304c\u306a\u3044\u306e\u3067\u3001\u3068\u308a\u3042\u3048\u305aPHP7\u3067\u52d5\u4f5c\u3059\u308b\u3088\u3046\u306b\u4e0b\u8a18\u306e\u3088\u3046\u306b\u5909\u66f4\u3057\u3066\u307f\u305f\u3002<\/p>\n<p><strong>amazon_linkage:<\/strong><\/p>\n<ul>\n<li>split()\u3092explode()\u3078\u5909\u66f4\u3002\n<\/ul>\n<div class=\"hl-surround\" ><div class=\"hl-main\"><pre>diff -u old\/wp-content\/plugins\/amazon_linkage\/amazon.php wp-content\/plugins\/amazon_linkage\/amazon.php\r\n--- old\/wp-content\/plugins\/amazon_linkage\/amazon.php      2008-06-07 00:17:48.000000000 +0900\r\n+++ wp-content\/plugins\/amazon_linkage\/amazon.php       2019-11-15 04:33:46.038804505 +0900\r\n@@ -4,7 +4,7 @@\r\n Plugin URI: http:\/\/note.openvista.jp\/187\/\r\n Description: ASIN \u3092\u6307\u5b9a\u3057\u3066 Amazon.co.jp \u304b\u3089\u500b\u5225\u5546\u54c1\u306e\u60c5\u5831\u3092\u53d6\u308a\u51fa\u3057\u307e\u3059\r\n Author: leva + \u3068\u3082\u304b\u3081\r\n-Version: 0.6.3\r\n+Version: 0.6.3b\r\n Author URI: http:\/\/note.openvista.jp\/187\/\r\n Special Thanks: Tomokame, 1st created author (http:\/\/tomokame.moo.jp\/)\r\n Special Thanks: Keith Devens.com (http:\/\/keithdevens.com\/software\/phpxml)\r\n@@ -212,7 +212,7 @@\r\n     for($i=0; $i&lt;count($matches[1]); $i++){\r\n\r\n       $matches[1][$i] = preg_replace(&quot;\/[\\- ]\/&quot;, &quot;&quot;, $matches[1][$i]);\r\n-      list($this-&gt;asins_[$i], $this-&gt;types_[$i], $this-&gt;extras_[$i]) = split(&quot;,&quot;, $matches[1][$i]);\r\n+      list($this-&gt;asins_[$i], $this-&gt;types_[$i], $this-&gt;extras_[$i]) = explode(&quot;,&quot;, $matches[1][$i]);\r\n\r\n       $this-&gt;shadows_[$i] = true;<\/pre><\/div><\/div>\n<p><strong>php_hl_string:<\/strong><\/p>\n<ul>\n<li>preg_replace()\u3092preg_replace_callback()\u3078\u5909\u66f4\u3002\n<ul>\n<li><a href=\"https:\/\/hnw.hatenablog.com\/entry\/20100815\">\u4f8b\u3048\u3070PHP\u306epreg_replace\u95a2\u6570\u3067e\u4fee\u98fe\u5b50\u3092\u907f\u3051\u308b &#8211; hnw\u306e\u65e5\u8a18<br \/>\n<\/a><\/p>\n<li><a href=\"http:\/\/blog.64p.org\/entry\/2013\/07\/17\/151532\">[PHP] preg_replace \u306b\u304a\u3051\u308b \/\/e \u304c\u3042\u3076\u306a\u3044\u8a71 &#8211; tokuhirom&#8217;s blog<br \/>\n<\/a>\n <\/ul>\n<li>eregi_replace()\u3092preg_replace()\u3078\u5909\u66f4\u3002\uff08eregi\u306f\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u3092\u7121\u8996\u3059\u308b\u7f6e\u63db\u3060\u304c\u3001\u3053\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u3067\u306e\u4f7f\u7528\u7b87\u6240\u306f\u6587\u5b57\u304c\u306a\u3044\u306e\u3067\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u306e\u7121\u8996\u306f\u4e0d\u8981\u3060\u3063\u305f\u304b\u3082\uff1f\uff09\n<ul>\n<li><a href=\"https:\/\/www.php.net\/manual\/ja\/function.eregi-replace.php\">PHP: eregi_replace &#8211; Manual<br \/>\n<\/a>\n <\/ul>\n<li>\u5185\u90e8\u304b\u3089\u547c\u3073\u51fa\u3057\u3066\u3044\u308bPEAR\/Text\u306e\u95a2\u6570\u3067\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u751f\u6210\u306e\u300c=&#038; new\u300d\u3092\u300c= new\u300d\u3078\u5909\u66f4\u3002\n<ul>\n<li><a href=\"https:\/\/www.php.net\/manual\/ja\/migration70.incompatible.php\">PHP: \u4e0b\u4f4d\u4e92\u63db\u6027\u306e\u306a\u3044\u5909\u66f4\u70b9 &#8211; Manual<br \/>\n<\/a><\/p>\n<ul>\n<li>new \u6587\u306e\u7d50\u679c\u3092\u53c2\u7167\u6e21\u3057\u3067\u5909\u6570\u306b\u4ee3\u5165\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u306a\u304f\u306a\u308a\u307e\u3057\u305f\u3002\n<\/ul>\n<\/ul>\n<\/ul>\n<div class=\"hl-surround\" style=\"height:280px;\"><div class=\"hl-main\"><pre>--- old\/wp-content\/plugins\/phphlstring\/php_hl_string.php      2019-11-25 05:34:19.887690704 +0900\r\n+++ wp-content\/plugins\/phphlstring_0.9.9\/php_hl_string.php   2019-11-25 05:28:47.537690790 +0900\r\n@@ -3,7 +3,7 @@\r\n Plugin Name: PHP Highligh String\r\n Plugin URI: http:\/\/www.chameleonic.org\/plugin\/\r\n Description: PHP\u306e\u30b3\u30fc\u30c9\u3092\u898b\u3084\u3059\u304f\u8272\u5206\u3051\u3057\u306a\u304c\u3089\u3001\u884c\u756a\u53f7\u3092\u3064\u3051\u307e\u3059\u3002\u4f7f\u3044\u65b9\u306f\u3001[code lang=&quot;php&quot; -1]\u30b3\u30fc\u30c9[\/code ]\u306e\u3088\u3046\u306bbbCode\u98a8\u306e\u5c02\u7528\u30bf\u30b0\u3092\u66f8\u304d\u307e\u3059\u3002\r\n-Version: 0.9.9\r\n+Version: 0.9.9b\r\n Author: chameleon\r\n Author URI: http:\/\/www.chameleonic.org\/\r\n *\/\r\n@@ -24,7 +24,7 @@\r\n *\/\r\n\r\n \/\/PEAR\u306b\u4f9d\u5b58\u3059\u308b\u3002\r\n-$pear_dir = ABSPATH . 'wp-content\/plugins\/phphlstring\/PEAR';\r\n+$pear_dir = ABSPATH . 'wp-content\/plugins\/phphlstring_0.9.9\/PEAR';\r\n\r\n if(is_dir($pear_dir))\r\n     ini_set(&quot;include_path&quot;, ini_get(&quot;include_path&quot;) . PATH_SEPARATOR . $pear_dir);\r\n@@ -88,9 +88,18 @@\r\n\r\n     function first($content)\r\n     {\r\n-        $content = preg_replace('#\\[code\\](.*?)\\[\/code\\]#sie', '$this-&gt;do_hlight(\\'\\\\1\\', false,    false,    $content);', $content);\r\n-        $content = preg_replace('#\\[code lang=&quot;(.*?)&quot;\\](.*?)\\[\/code\\]#sie', '$this-&gt;do_hlight(\\'\\\\2\\',\\'\\\\1\\',false,$content);', $content);\r\n-        $content = preg_replace('#\\[code lang=&quot;(.*?)&quot;\\s*?-([0-9]*?)\\](.*?)\\[\/code\\]#sie', '$this-&gt;do_hlight(\\'\\\\3\\',\\'\\\\1\\',\\'\\\\2\\',$content);', $content);\r\n+        $content = preg_replace_callback(\r\n+                '#\\[code\\](.*?)\\[\/code\\]#si',\r\n+                function($m){return $this-&gt;do_hlight($m[1], false, false, $content);},\r\n+                $content);\r\n+        $content = preg_replace_callback(\r\n+                 '#\\[code lang=&quot;(.*?)&quot;\\](.*?)\\[\/code\\]#si',\r\n+                function($m){return $this-&gt;do_hlight($m[2],$m[1],false,$content);},\r\n+                $content);\r\n+        $content = preg_replace_callback(\r\n+                 '#\\[code lang=&quot;(.*?)&quot;\\s*?-([0-9]*?)\\](.*?)\\[\/code\\]#si',\r\n+                function($m){return $this-&gt;do_hlight($m[3],$m[1],$m[2],$content);},\r\n+                $content);\r\n         return $content;\r\n     }\r\n\r\n@@ -107,7 +116,7 @@\r\n     function do_hlight($txt, $lang = false,   $sl,    $content)\r\n     {\r\n        \/\/fixed for PHP--------------------\r\n-       $txt=eregi_replace('&lt;?','&lt;',$txt);\r\n+       $txt=preg_replace('#&lt;?#i','&lt;',$txt);\r\n        \/\/---------------------------------\r\n        if(!($sl==false)){\r\n                $options = array('numbers' =&gt; HL_NUMBERS_LI,    'tabsize' =&gt; 4,);\r\n@@ -142,9 +151,18 @@\r\n\r\n     function first_pre($content)\r\n     {\r\n-        $content = preg_replace('#\\[code\\](.*?)\\[\/code\\]#sie', '$this-&gt;do_blocks(\\'\\\\1\\',false, $content);', $content);\r\n-        $content = preg_replace('#\\[code lang=\\\\\\&quot;(.*?)\\\\\\&quot;\\](.*?)\\[\/code\\]#sie', '$this-&gt;do_blocks(\\'\\\\2\\', \\'\\\\1\\', $content);', $content);\r\n-        $content = preg_replace('#\\[code lang=\\\\\\&quot;(.*?)\\\\\\&quot;\\s*?-([0-9]*?)\\](.*?)\\[\/code\\]#sie', '$this-&gt;do_blocks_extend(\\'\\\\3\\', \\'\\\\1\\',\\'\\\\2\\', $content);', $content);\r\n+        $content = preg_replace_callback(\r\n+                 '#\\[code\\](.*?)\\[\/code\\]#si',\r\n+                function($m){return $this-&gt;do_blocks($m[1],false, $content);},\r\n+                $content);\r\n+        $content = preg_replace_callback(\r\n+                '#\\[code lang=\\\\\\&quot;(.*?)\\\\\\&quot;\\](.*?)\\[\/code\\]#si',\r\n+                function($m){return $this-&gt;do_blocks($m[2], $m[1], $content);},\r\n+                $content);\r\n+        $content = preg_replace_callback(\r\n+                '#\\[code lang=\\\\\\&quot;(.*?)\\\\\\&quot;\\s*?-([0-9]*?)\\](.*?)\\[\/code\\]#si',\r\n+                function($m){return $this-&gt;do_blocks_extend($m[3],$m[1],$m[2], $content);},\r\n+                $content);\r\n         return $content;\r\n     }\r\n\r\n--- old\/wp-content\/plugins\/phphlstring\/PEAR\/Text\/Highlighter.php     2005-08-14 20:36:08.000000000 +0900\r\n+++ wp-content\/plugins\/phphlstring_0.9.9\/PEAR\/Text\/Highlighter.php   2019-11-24 22:42:12.468698227 +0900\r\n@@ -199,7 +199,7 @@\r\n             return PEAR::raiseError('Highlighter for ' . $lang . ' not found');\r\n         }\r\n\r\n-        $obj =&amp; new $classname($options);\r\n+        $obj = new $classname($options);\r\n\r\n         return $obj;\r\n     }\r\n@@ -353,7 +353,7 @@\r\n     {\r\n         if (!($this-&gt;_renderer)) {\r\n             include_once('Text\/Highlighter\/Renderer\/Html.php');\r\n-            $this-&gt;_renderer =&amp; new Text_Highlighter_Renderer_Html($this-&gt;_options);\r\n+            $this-&gt;_renderer = new Text_Highlighter_Renderer_Html($this-&gt;_options);\r\n         }\r\n         $this-&gt;_str = $str;\r\n         $this-&gt;_state = -1;<\/pre><\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\uff08\u6012\u6d9b\u306e\u3081\u3082\u3081\u3082\u30ea\u30f3\u30af\u96c6 | WordPress: PHP\u30925.6\u304b\u30897.3\u306b\u66f4\u65b0\u3057\u305f\u3089\u3001\u30d7\u30e9\u30b0\u30a4\u30f3\u30a8\u30e9\u30fc\uff12\u4ef6\u3001\u672c\u6587\u8868\u793a\u5931\u6557\u306e\u7d9a\u304d\uff09 PHP5\u3092PHP7\u306b\u66f4\u65b0\u3092\u884c\u306a\u3063\u305f\u3089WordPress\u304c\u52d5\u4f5c\u3057\u306a\u304f\u306a\u3063\u305f\u4ef6\u306b\u3064\u3044\u3066\u3001\u30c1 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[1],"tags":[439,4,437,438,3,30],"_links":{"self":[{"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/posts\/6957"}],"collection":[{"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/comments?post=6957"}],"version-history":[{"count":10,"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/posts\/6957\/revisions"}],"predecessor-version":[{"id":7016,"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/posts\/6957\/revisions\/7016"}],"wp:attachment":[{"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/media?parent=6957"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/categories?post=6957"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/tags?post=6957"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}