|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-05-30 19:46 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 04 19:00:01 2025 UTC |
Description: ------------ Hi, When I recently with my project used a foreach with a string, consequently not with an array, apache spontaneously crashed. An example could be found by reproduce code. I use: Apache 2.0.44 PHP 4.3.5 (yep, sorry, not the newest one...) Windows XP Proffesional SP1 English PHP is installed as an Apache module. (not CGI) Reproduce code: --------------- <?php // P.S. The code that I used in my project was to big, and I don't have a server to place it. So I use an example. $string = "Line 1 of the string This is line 2 so as you can see. And also line 3."; foreach ($string AS $key => $line) { // Do some actions.. } ?> Expected result: ---------------- Well, is should expect an array from PHP with: Can only use arrays in foreach loops or something. Actual result: -------------- Apache crashed as I already said.