1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
<?php echo "Static Testcase: "; for ($i=0; $i<=20; $i++) { static $foobar = 0; echo $foobar . ","; $foobar++; } echo "\nGeneral Testcase: "; $foobar2 = 0; for ($i=0; $i<=20; $i++) { echo $foobar2 . ","; $foobar2++; }
1 2
Static Testcase: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20, General Testcase: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,