(PHP) Why is this while loop an infinite loop?

ساخت وبلاگ

Vote count: 0

Can you please help me understand why this while loop repeats at 1 infinitely? What I'm trying to do it make a function that calls itself and prints out every number that is passed into is via the parameter.

<?php
function least($num) { echo $num . '<br>'; $num -= 1; while ($num > 0) { least($num); }
}
echo least(10);
?>
asked 38 secs ago

back soft...
ما را در سایت back soft دنبال می کنید

برچسب : php why is post empty,php why is mysql deprecated,php why is bad,php why is files empty,php why is it good,php why is my session empty,php why is eval bad,php why is echo not working,php why is it used,why php is called hypertext preprocessor, نویسنده : استخدام کار backsoft بازدید : 319 تاريخ : سه شنبه 30 شهريور 1395 ساعت: 13:14