0

What's wrong with this code? I simplified the code as much as possible, but there is still an error

<?php

function createContact($arFields) {
 
    $newContactId = 0;
    return $newContactId;

}

Error shows VSCode and Local server PHP VSCode

  • 2
    Pasting that code into VSCode or a new file on a server doesn't show any error. It must be something different. – Constantin Groß Jul 22 '21 at 06:21
  • Have you tried restarting VS Code? Is OPCache maybe enabled on your server? – Constantin Groß Jul 22 '21 at 06:23
  • 1
    Don't paste simplified code but your exact, original code where the error appears – brombeer Jul 22 '21 at 06:25
  • Nontransmittable syntax errors are usually based on Unicode whitespace. The code as posted here does not exhibit a syntax issues. So if the copy and paste is deemed good enough for posting here, why not just copy and paste it back into your editor? – mario Jul 22 '21 at 06:31
  • Thanks! I reformatted whole code, and error has gone. – crazydrummer Jul 22 '21 at 06:46

0 Answers0