php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23261 $f[$i][0] = 2.95*COS((4*3.1415+i*(4*3.1415)/$n));
Submitted: 2003-04-17 12:05 UTC Modified: 2003-04-17 12:15 UTC
From: nicolae79 at oneup dot ro Assigned:
Status: Not a bug Package: Math related
PHP Version: 4.3.2RC1 OS: WINDOWS 2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: nicolae79 at oneup dot ro
New email:
PHP Version: OS:

 

 [2003-04-17 12:05 UTC] nicolae79 at oneup dot ro
Fatal error: Maximum execution time of 320 seconds exceeded in c:\program files\apache group\apache\htdocs\spiral.php on line 51


the problem is that ...I want to use these functions and
I do not know Why it thake so long to calculate just the first line,...And what to say about the hole code...
IT can be possible to run this unde PHP Apache server?
unde Pascal it work fine...

Thanks,..
I hope somebody can help me...

//-------------------------------------------------------------
for($i = 1;$i = $n; $i++)
{
                   $a[$i][0] = 3.2*COS((4*3.1415+$i*(4*3.1415)/$n));
                   $a[$i][2] = 3.2*SIN((4*3.1415+$i*(4*3.1415)/$n));
                   $a[$i][1] = (0.25+$i/5);

}

//--------------------------------------------------------------
for($i = 1;$i = $n; $i++)
{
                   $b[$i][0] = 3.2*COS((4*3.1415+$i*(4*3.1415)/$n));
                   $b[$i][2] = 3.2*SIN((4*3.1415+$i*(4*3.1415)/$n));
                   $b[$i][1] = ($i/5);

}

//--------------------------------------------------------------
for($i = 1;$i = $n; $i++)
{
                   $c[$i][0] = 0.1*COS((4*3.1415+$i*(4*3.1415)/$n));
                   $c[$i][2] = 0.1*SIN((4*3.1415+$i*(4*3.1415)/$n));
                   $c[$i][1] = (0.25+$i/5);

}

//--------------------------------------------------------------
for($i = 1;$i = $n; $i++)
{
                   $d[$i][0] = 2.95*COS((4*3.1415+$i*(4*3.1415)/$n));
                   $d[$i][2] = 2.95*SIN((4*3.1415+$i*(4*3.1415)/$n));
                   $d[$i][1] = (0.25+$i/5);

}

//--------------------------------------------------------------
for($i = 1;$i = $n; $i++)
{
                   $e[$i][0] = 2.95*COS((4*3.1415+$i*(4*3.1415)/$n));
                   $e[$i][2] = 2.95*SIN((4*3.1415+$i*(4*3.1415)/$n));
                   $e[$i][1] = (0.25+$i/5);

}

//--------------------------------------------------------------
for($i = 1;$i = $n; $i++)
{
                   $f[$i][0] = 2.95*COS((4*3.1415+i*(4*3.1415)/$n));
                   $f[$i][2] = 2.95*SIN((4*3.1415+i*(4*3.1415)/$n));
                   $f[$i][1] = (0.25+$i/5);

}

//--------------------------------------------------------------

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-04-17 12:15 UTC] jay@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

This isn't a bug, your logic is wrong. Look at your 
for-loop. In the conditional section ($i = $n), you're 
doing an assignment instead of checking for a condition. 
 
J 
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue Dec 10 10:01:24 2019 UTC