search

Home  >  Q&A  >  body text

Function syntax issues

echo '4. Use function to create a self-executing function: <br>';

echo (function ($a,$b){

return $a.' ' .$b.'='.($a $b);

})(20,30);

How to display Parse error: syntax error, unexpected ';' in


phpcn_u60427phpcn_u604272609 days ago1237

reply all(2)I'll reply

  • ringa_lee

    ringa_lee2017-12-05 20:46:08

    Versions below php 7 do not support this writing method. You can try changing to php7 and it can be output! !

    reply
    1
  • phpcn_u60427

    Okay, thank you

    phpcn_u60427 · 2017-12-05 20:51:52
  • Cancelreply