String problems.. echo random garbage?

General discussions related to php

Moderators: egami, macek, gesf

Post Reply
francogp
New php-forum User
New php-forum User
Posts: 2
Joined: Fri Feb 14, 2020 2:11 am

Fri Feb 14, 2020 2:21 am

Hello,
I have a strange code appearing randomly on the web (its not in the code). If I add an enter or something on the code, the strange symbols shift to other strange places, like this image
Image

I cloned code on purpose, and the bug only appear around line 1230. No matter how many times I repeat the code that generate the string, the bug appear in the same line... and all other lines are OK.
If I go to the code, there's no special characters. Is there a known bug for string concatenation? I'm using

PHP 7.4.2 (cli) (built: Feb 5 2020 16:50:55) ( NTS ) for ubuntu 18.04
Apache/2.4.41 (Ubuntu)

NOTE: If I keep pressing F5 to refresh, the strange code CHANGE... and sometimes disappear
User avatar
hyper
php-forum GURU
php-forum GURU
Posts: 934
Joined: Mon Feb 22, 2016 5:52 pm

Fri Feb 14, 2020 10:26 am

We need more information and code.

Are you only using the PHP from the command line?
francogp
New php-forum User
New php-forum User
Posts: 2
Joined: Fri Feb 14, 2020 2:11 am

Mon Feb 17, 2020 1:35 am

The problem is, that I cannot isolate the problematic code. There's a lot of function returning strings, and concatenating them in another functions. There's no other calls. I will try to simplify it so I can show something.
I use PHP from apache2 service, I don't run it from command line manually
Post Reply