php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #15017 Repeat
Submitted: 2002-01-13 12:40 UTC Modified: 2002-01-13 16:14 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: Don at phice dot com Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.1.1 OS: Windows
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: Don at phice dot com
New email:
PHP Version: OS:

 

 [2002-01-13 12:40 UTC] Don at phice dot com
You should add a Repeat(); function. In example;
<?
$function = "foo";
repeat($function, 4);
?>

Which, will repeat "foo", 4 times.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-13 12:42 UTC] derick@php.net
<?php
$function = "foo";

for ($i = 0; $i < 4; $i++) { $function(); }

?>

I don't think there is a need to add another language construct for this.

Derick
 [2002-01-13 12:43 UTC] mfischer@php.net
What's wrong with str_repeat() ?
 [2002-01-13 12:44 UTC] rasmus@php.net
Nothing, but that wasn't what he was asking for.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Oct 06 09:01:26 2024 UTC