Hello everbody,

I have noticed something quite strange,
i have a piece of code that looks like, i removed some of it to make it
readable:

there are no statements in the code that would cause the termination of the
method before reaching the last line, no return, die or whatever.
<?

  echo "\nBegin\n";

/* some code that builds a string of a few hundred bytes*/

/* a loop that ads ads numbers to the ascii vals of those string named $enc
*/

/* a loop that swaps all the neighboring chars in the string */

  echo "swap: ".$enc."\n";

// swap 1st and 2nd half of string
  $len=strlen($enc);
  $enc=substr($enc,$len/2,$len/2).substr($enc,0,$len/2);

  echo "swp2: ".$enc."\n";

  echo "end\n";

?>

This thing is part of a object method, which is called repeatedly.

There absolutely NO way 'end' could be printed here without 'swp2' being
printed, right, but it does.
Also i have occurences of 'swap' without a matching 'end' or 'swp2', like
this:
(the garbage is the content of '$enc', removing it from the output causes
the error to dissappear)
-output-
Begin
swap:
0064277255621244332329528893584643078166114004540827;5>862126663:629;888;;58
664307819;fX$reJxre|"yuw%iVft$rhyuujlnnçm5wi(vkq#ch|ij&fj2
.25C18U8oej|kf!py~3364e\tj||whi(goxk07;2iYximee~%vo~2y82X:nebyif#qwuvwwg
swp2: ft$rhyuujlnnçm5wi(vkq#ch|ij&fj2
.25C18U8oej|kf!py~3364e\tj||whi(goxk07;2iYximee~%vo~2y82X:nebyif#qwuvwwg0064
277255621244332329528893584643078166114004540827;5>862126663:629;888;;586643
07819;fX$reJxre|"yuw%iV
end

Begin
swap:
0054716330009693653323102831238781328247354221531537080463:95@4734928:223572
1<2823<8\:nhig#gfM{vo#wsk
rk)qkGwvpdudkm#mgg(zmnvppemskhrgC!lxtj3F06H;xokwzj3z33N:|fi|xd7v28TBegin
swap:
0034211011257391046799446105509563315163822007167287673;775?=69<<91<;601553<
161375F8eqa"oe"ufd!sćItp{fny&nnwrr&uar%n~fnf1!3/6B92t2tv!keUvlio3g27k;senhQ)
omy{0e65e;brfxV%wzdv7g70i2ýrfoY%jrni
swp2:
!sćItp{fny&nnwrr&uar%n~fnf1!3/6B92t2tv!keUvlio3g27k;senhQ)omy{0e65e;brfxV%wz
dv7g70i2ýrfoY%jrni0034211011257391046799446105509563315163822007167287673;77
5?=69<<91<;601553<161375F8eqa"oe"ufd
end
Begin
swap:
00549629613229801512122201313670455389527981851464=:2:4997727A;:21981;306703
59349588`7mlmkvmF!pkk{lgv"g}|hg%sţf"pk
fhXexmečqmf(nzc'ovJmyovzin|ukpk9B02G?qsuxtf1270gEnqwl34=5jK}f17=8vXzpmotn
swp2: pkk{lgv"g}|hg%sţf"pk
fhXexmečqmf(nzc'ovJmyovzin|ukpk9B02G?qsuxtf1270gEnqwl34=5jK}f17=8vXzpmotn005
49629613229801512122201313670455389527981851464=:2:4997727A;:21981;306703593
49588`7mlmkvmF!
end
Begin
swap:
002471894193230257221322567045301134119648109371:9=1>6238:5:52136656>3457011
4;bNmtpmjl˙n5sL)rG"hiMxyjeohf"xgz rn#dnBueoftgvqdsnk5omTqfth
AnZjesh2#66H7erhruu#stj)z26@.9382qTwsqfkoöm5y22B6238:5:52136656>34570114;bNm
tpmjl˙n5sL)rG"hiMxyjeohf"xgz r
end
Begin
swap:
00547198053854516883507941428066511232699173281113A7>::84385:<7:0<>51<640:68
192521?3I9qnyN"ojlm)zcxupjm%ckl(qtRhv$o*"}qzu\15>6dYt|ujdznlpikxtx2581xPetv
n8782uLifn{0x38G=rvxmvdxg
swp2:
pjm%ckl(qtRhv$o*"}qzu\15>6dYt|ujdznlpikxtx2581xPetvn8782uLifn{0x38G=rvxmvdxg
00547198053854516883507941428066511232699173281113A7>::84385:<7:0<>51<640:68
192521?3I9qnyN"ojlm)zcxu
end-output-
Multiple cases of malfunction in this output,
After 2nd Begin: method was not executed properly, even though script
continued afterwards.
The next Blocks seem to miss either the \n before begin or the \n after end
in the fourth block, swap and end are displayed while swp2 is not

When i start to reduce the code by either removing $enc from the output or
deleting the loops that manipulate the string before, the echos come in the
right order and ammount...

What can i do, nothing crashed so i dont have a gdb backtrace for an bug
report.
I cant provide all the code, neither can i reduce the code without the error
do disappear

The problem occured on
PHP 4.04pl1 on Apache 1.3.x on Linux
PHP 4.04 on Apache 1.3.x on Linux
PHP 4.06 on Apache 1.3.x on W2K

thanks
Jens

Reply via email to