Report this

What is the reason for this report?

php 8.2 to 8.3 migration

Posted on May 1, 2026

I have an app project with quite a bit of legacy code. I recently upgraded from 8.2 to 8.3 and started running into a problem. At the same time I am migrating some of the app to Laravel and, thus, I am doing some refactoring anyway. Basically some coding techniques that were working fine for years are suddenly generating errors but I can’t tell if it is the server or the php version change that is the cause.

My style has been to concatenate on to a variable ($display_block for example) as the code is parsed but php generated error messages are choking at any and all double quotes. I need to know if this was caused by migrating to 8.3?

The genesis var = (notice all the double quotes) $display_block = ‘<div id=“members_links” style=“background-color:lightgray;”><h3>Place A New Ad Across The Entire CCAN Network</h3></div><div style= “margin: auto; width:80%; padding: 15px; border-radius: 30px; border-style: solid; border-width:10px; border-color: red yellow green blue; background: rgb(15,21,73); background: linear-gradient(90deg, rgba(15,21,73,1) 0%, rgba(15,21,73,1) 35%, rgba(175,202,228,1) 100%);”>’; Subsequent concatenations: $display_block .= ‘<div class=“reg_form_page” style="color: white; "><h1 align=“center”>Confirm Your New Ad Details You Entered For Accuracy</h1> <div class=“reg_form_content”> <form class = “frms” method=“POST” action="https://’ . AGENT_URL . ‘/odp2./process_addALink.php" name=“registerform”>’;

The error code generated by my Laravel always revolves around the use of double quotes (inside an assignment to the $display_block surrounded by single quotes). # ParseError

                             resources/legacy/opendirectoryproject/dashboard/views/ads.php:162


        syntax error, unexpected integer "20"

From what I have heard, that error message is a php generated error message. Here is where things start to make no sense. As part of troubleshooting I started changing my style to where I switch off php to display text and turn php back on to parse php.

What is really weird is that IF the errors are, indeed, generated by php then php is blowing by the closing tag (?>). That can be demonstrated to a point by changing the double to a single quote. The parsing will accept the single quote BUT it is all still outside the php tags. I have walked the errors down the page by changing from double to single quotes.

Another weird fact pointing out that it is a php 8.3 version issue is when I run the code on a php tester (bairesdev.com) and it finds the exact same errors. BUT why does php on their server blow by the closing php ?> and parse non-php code?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi there,

This is not a PHP 8.3 issue. Double quotes inside single-quoted strings have worked the same way since forever and that did not change in 8.3.

The error syntax error, unexpected integer "20" points to something specific on line 162 of that file. The number 20 appearing as an unexpected integer usually means PHP is choking on something like a CSS value or an inline number inside a string that is not actually inside a string anymore because a quote got unbalanced earlier in the file.

The most likely cause is a broken string somewhere above line 162. One unmatched quote earlier in the file causes PHP to misread everything below it, which explains why changing quotes seems to “walk the error down the page”. You are not fixing the real problem, you are just shifting where the parser gets confused.

A few things to try:

Run the file directly through PHP on your server to get the raw error without Laravel’s output wrapping it:

php -l resources/legacy/opendirectoryproject/dashboard/views/ads.php

This will give you the exact line of the actual syntax error, not just where PHP finally gives up.

Also check for any characters that might have gotten corrupted during the Laravel migration, things like curly quotes (" ") instead of straight quotes ("), which can happen when copying code through certain editors or browsers. Those are invisible in some editors but will break PHP parsing immediately.

The fact that an online PHP tester shows the same errors confirms it is a code issue, not a server or version issue.

Heya, @41809fc37fa549b98a34934d238850

Short answer: this is not a PHP 8.3 “double quote parsing” change. PHP 8.3 did not change how strings or quotes work in the way you’re describing.

What you’re seeing is almost certainly one of these two issues:


1. Your quotes are not actually normal quotes

In your example you are using curly quotes:

  • “ ” (smart quotes)
  • instead of " " (ASCII double quotes)

Same for single quotes:

  • ‘ ’ instead of '

PHP treats curly quotes as invalid tokens, which leads to very confusing parse errors like:

unexpected integer “20”

That error is often just PHP “getting lost” after broken string parsing.


2. Once a string breaks, PHP mis-parses everything after it

When PHP hits invalid quote characters, it can:

  • fail to close a string properly
  • then interpret HTML as PHP code
  • then “blame” a random token later in the file

That explains:

  • “blows past ?>”
  • errors appearing outside PHP tags
  • errors moving when you change quotes

PHP isn’t skipping tags — it has already lost syntax structure earlier.


Why it works on some testers but not others

Some online tools:

  • auto-normalize smart quotes → ASCII
  • or pre-process input differently

So behavior can appear inconsistent.


What to do (practical fix)

  1. Replace ALL curly quotes in the file
    • Replace:
      • and "
      • and '
  2. In your editor:
    • disable “smart quotes”
    • or run a global search/replace
  3. Re-run PHP 8.3 after cleanup

Hope that this helps!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.