I'm new to PHP (well, I was a master at PHP3, but that all went out the window when I took a break for another career path). I recently got back into writing PHP, and, back to old habits of how I would have structured and formatted the code.
I learned from PHP.net what I needed to do to get something done, and it worked from the garbage I put together. However, I wanted to see where ChatGPT could help. I asked it to optimize my code for PHP 8.3 and it reduced lines by like 1/2.
It then made me wonder about the execution time of the script. So, I added an output for that for my old code and new code. The code I learned and wrote from PHP.net took 0.2-0.3 seconds (a small application, but a heavy loop, and files to write to) to 0.02-0.07 seconds.
I took note of the functions ChatGPT taught me and put those in my knowledge bank, as to not repeat the same mistakes, or to know what to do differently next time.
It's surely going to change coding...
I wondered if you put the entire Xenforo script through ChatGPT if it would be even more efficient. But, I don't think it would do much there, to be Frank. As a gimmick, I put /XF/AdminSearch/Searcher.php (2.2.8PL2) through the same way and it took it down from 169 to 126 lines. To be fair, it did strip the 14 lines of comments. Also, I'm unsure if it would still function if I replaced the file (and knew where to go to see if it worked the same). So, it could improve XF... if the devs used it and didn't rely solely on their learned knowledge. Though, it could become a crutch, so it's a double-edged sword.
Edit: I don't know if I'm allowed to post the main file and the ChatGPT revision due to copyright infringement to see if any coders could see if it would actually work.