{"id":852,"date":"2022-08-30T15:08:15","date_gmt":"2022-08-30T15:08:15","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/09\/php-error-call-to-undefined-function-adduser-what-am-i-doing-wrong-closed-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:08:15","modified_gmt":"2022-08-30T15:08:15","slug":"php-error-call-to-undefined-function-adduser-what-am-i-doing-wrong-closed-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/php-error-call-to-undefined-function-adduser-what-am-i-doing-wrong-closed-collection-of-common-programming-errors\/","title":{"rendered":"PHP Error: &ldquo;Call to undefined function AddUser() &rdquo;. What am I doing wrong? [closed]-Collection of common programming errors"},"content":{"rendered":"<p>You don&#8217;t use the <code>.<\/code> in PHP. Use <code>-&gt;<\/code> instead, eg:<\/p>\n<pre><code>$x-&gt;AddUser('FakeId','FakeUser');\n$x-&gt;Refresh('FakeUser');\n<\/code><\/pre>\n<p>The <code>.<\/code> is PHP&#8217;s concatenation operator, so it thinks you want<\/p>\n<pre><code>$x . AddUser('FakeId', 'FakeUser'); \/\/ $x concatenated with AddUser(...)\n<\/code><\/pre>\n<p>And of course <code>Adduser()<\/code> is undefined.<\/p>\n<p id=\"rop\"><small>Originally posted 2013-11-09 22:49:01. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>You don&#8217;t use the . in PHP. Use -&gt; instead, eg: $x-&gt;AddUser(&#8216;FakeId&#8217;,&#8217;FakeUser&#8217;); $x-&gt;Refresh(&#8216;FakeUser&#8217;); The . is PHP&#8217;s concatenation operator, so it thinks you want $x . AddUser(&#8216;FakeId&#8217;, &#8216;FakeUser&#8217;); \/\/ $x concatenated with AddUser(&#8230;) And of course Adduser() is undefined. Originally posted 2013-11-09 22:49:01.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-852","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/852","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=852"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/852\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=852"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=852"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=852"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}