3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php //$start_date =strtotime('2013-02-13 12:02:00'); //$end_date =strtotime('2013-02-20 12:02:00'); //$total = ($end_date- $start_date); //echo date("Y-m-d H:i:s",$total); $count = 5; for($i=$count;$i>=0;$i--){ $array = array_fill(0,$i,'X'); echo implode("",$array); echo "<br>"; }
Output for 5.6.8 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
XXXXX<br>XXXX<br>XXX<br>XX<br>X<br><br>
Output for 5.2.5 - 5.5.35
XXXXX<br>XXXX<br>XXX<br>XX<br>X<br> Warning: array_fill(): Number of elements must be positive in /in/hap9B on line 9 Warning: implode(): Invalid arguments passed in /in/hap9B on line 10 <br>
Output for 4.3.2 - 5.2.4
XXXXX<br>XXXX<br>XXX<br>XX<br>X<br> Warning: array_fill(): Number of elements must be positive in /in/hap9B on line 9 Warning: implode(): Bad arguments. in /in/hap9B on line 10 <br>
Output for 4.3.0 - 4.3.1
XXXXX<br>XXXX<br>XXX<br>XX<br>X<br> Warning: array_fill() [http://www.php.net/function.array-fill]: Number of elements must be positive in /in/hap9B on line 9 Warning: implode() [http://www.php.net/function.implode]: Bad arguments. in /in/hap9B on line 10 <br>