<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>rockstar2007</author_name>
  <author_url>https://blog.hatena.ne.jp/rockstar2007/</author_url>
  <blog_title>三十路エンジニアの備忘録+α</blog_title>
  <blog_url>https://rockstar2007.hatenadiary.org/</blog_url>
  <categories>
    <anon>PHP</anon>
  </categories>
  <description>下記のシェルスクリプトを [test.sh] echo 'aaa' echo 'bbb' 下記のように呼び出すと、下記の通りの出力が得られます。 [test1.php] echo exec('test.sh'); [出力結果] bbb で「bbb」だけでなく、「aaa」も出力したいと思いexec()をsystem()に変えました。すると以下の通りの結果となりました。 [test2.php] echo system('test.sh'); [出力結果] aaa bbb bbb なぜbbbが2回出力される・・ 答え：system()の場合はechoはいらない [test3.php] system(…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Frockstar2007.hatenadiary.org%2Fentry%2F20081109%2F1226213863&quot; title=&quot;PHPのexec()をsystem()に変えたら最後の出力が2回出力された - 三十路エンジニアの備忘録+α&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2008-11-09 15:57:43</published>
  <title>PHPのexec()をsystem()に変えたら最後の出力が2回出力された</title>
  <type>rich</type>
  <url>https://rockstar2007.hatenadiary.org/entry/20081109/1226213863</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
