<?php
$calendar = array (January, February, March, April, May, June, July, August, September, October, November, December);
while($e < sizeof($calendar)) {
$k++;
$days = 30;
$days2 = 31;
switch ($calendar[$e]) {
case $calendar[0]:
echo "Month ",$k,": $calendar[$e] has $days days <br>";
break;
case $calendar[1]:
echo "Month $k: $calendar[$e] has 28 or 29 days <br>";
break;
case $calendar[2]:
echo "Month $k: $calendar[$e] has $days2 days <br>";
break;
case $calendar[3]:
echo "Month $k: $calendar[$e] has $days days <br>";
break;
case $calendar[4]:
echo "Month $k: $calendar[$e] has $days days <br>";
break;
case $calendar[5]:
echo "Month $k: $calendar[$e] has $days days <br>";
break;
case $calendar[6]:
echo "Month $k: $calendar[$e] has $days2 days <br>";
break;
case $calendar[7]:
echo "Month $k: $calendar[$e] has $days days <br>";
break;
case $calendar[8]:
echo "Month $k: $calendar[$e] has $days days <br>";
break;
case $calendar[9]:
echo "Month $k: $calendar[$e] has $days2 days <br>";
break;
case $calendar[10]:
echo "Month $k: $calendar[$e] has $days days <br>";
break;
case $calendar[11]:
echo "Month $k: $calendar[$e] has $days2 days <br>";
break;
}
$e++;
echo $e;
}
Fatal error: Uncaught Error: Undefined constant "January" in /in/vM4PZ:3
Stack trace:
#0 {main}
thrown in /in/vM4PZ on line 3
Process exited with code 255.
Warning: Use of undefined constant January - assumed 'January' (this will throw an Error in a future version of PHP) in /in/vM4PZ on line 3
Warning: Use of undefined constant February - assumed 'February' (this will throw an Error in a future version of PHP) in /in/vM4PZ on line 3
Warning: Use of undefined constant March - assumed 'March' (this will throw an Error in a future version of PHP) in /in/vM4PZ on line 3
Warning: Use of undefined constant April - assumed 'April' (this will throw an Error in a future version of PHP) in /in/vM4PZ on line 3
Warning: Use of undefined constant May - assumed 'May' (this will throw an Error in a future version of PHP) in /in/vM4PZ on line 3
Warning: Use of undefined constant June - assumed 'June' (this will throw an Error in a future version of PHP) in /in/vM4PZ on line 3
Warning: Use of undefined constant July - assumed 'July' (this will throw an Error in a future version of PHP) in /in/vM4PZ on line 3
Warning: Use of undefined constant August - assumed 'August' (this will throw an Error in a future version of PHP) in /in/vM4PZ on line 3
Warning: Use of undefined constant September - assumed 'September' (this will throw an Error in a future version of PHP) in /in/vM4PZ on line 3
Warning: Use of undefined constant October - assumed 'October' (this will throw an Error in a future version of PHP) in /in/vM4PZ on line 3
Warning: Use of undefined constant November - assumed 'November' (this will throw an Error in a future version of PHP) in /in/vM4PZ on line 3
Warning: Use of undefined constant December - assumed 'December' (this will throw an Error in a future version of PHP) in /in/vM4PZ on line 3
Notice: Undefined variable: e in /in/vM4PZ on line 4
Notice: Undefined variable: k in /in/vM4PZ on line 6
Notice: Undefined variable: e in /in/vM4PZ on line 9
Notice: Undefined index: in /in/vM4PZ on line 9
Notice: Undefined variable: e in /in/vM4PZ on line 49
1Month 2: February has 28 or 29 days <br>2Month 3: March has 31 days <br>3Month 4: April has 30 days <br>4Month 5: May has 30 days <br>5Month 6: June has 30 days <br>6Month 7: July has 31 days <br>7Month 8: August has 30 days <br>8Month 9: September has 30 days <br>9Month 10: October has 31 days <br>10Month 11: November has 30 days <br>11Month 12: December has 31 days <br>12
Output for 7.3.32 - 7.3.33, 7.4.26
Warning: Use of undefined constant January - assumed 'January' (this will throw an Error in a future version of PHP) in /in/vM4PZ on line 3
Warning: Use of undefined constant February - assumed 'February' (this will throw an Error in a future version of PHP) in /in/vM4PZ on line 3
Warning: Use of undefined constant March - assumed 'March' (this will throw an Error in a future version of PHP) in /in/vM4PZ on line 3
Warning: Use of undefined constant April - assumed 'April' (this will throw an Error in a future version of PHP) in /in/vM4PZ on line 3
Warning: Use of undefined constant May - assumed 'May' (this will throw an Error in a future version of PHP) in /in/vM4PZ on line 3
Warning: Use of undefined constant June - assumed 'June' (this will throw an Error in a future version of PHP) in /in/vM4PZ on line 3
Warning: Use of undefined constant July - assumed 'July' (this will throw an Error in a future version of PHP) in /in/vM4PZ on line 3
Warning: Use of undefined constant August - assumed 'August' (this will throw an Error in a future version of PHP) in /in/vM4PZ on line 3
Warning: Use of undefined constant September - assumed 'September' (this will throw an Error in a future version of PHP) in /in/vM4PZ on line 3
Warning: Use of undefined constant October - assumed 'October' (this will throw an Error in a future version of PHP) in /in/vM4PZ on line 3
Warning: Use of undefined constant November - assumed 'November' (this will throw an Error in a future version of PHP) in /in/vM4PZ on line 3
Warning: Use of undefined constant December - assumed 'December' (this will throw an Error in a future version of PHP) in /in/vM4PZ on line 3
1Month 2: February has 28 or 29 days <br>2Month 3: March has 31 days <br>3Month 4: April has 30 days <br>4Month 5: May has 30 days <br>5Month 6: June has 30 days <br>6Month 7: July has 31 days <br>7Month 8: August has 30 days <br>8Month 9: September has 30 days <br>9Month 10: October has 31 days <br>10Month 11: November has 30 days <br>11Month 12: December has 31 days <br>12
Notice: Use of undefined constant January - assumed 'January' in /in/vM4PZ on line 3
Notice: Use of undefined constant February - assumed 'February' in /in/vM4PZ on line 3
Notice: Use of undefined constant March - assumed 'March' in /in/vM4PZ on line 3
Notice: Use of undefined constant April - assumed 'April' in /in/vM4PZ on line 3
Notice: Use of undefined constant May - assumed 'May' in /in/vM4PZ on line 3
Notice: Use of undefined constant June - assumed 'June' in /in/vM4PZ on line 3
Notice: Use of undefined constant July - assumed 'July' in /in/vM4PZ on line 3
Notice: Use of undefined constant August - assumed 'August' in /in/vM4PZ on line 3
Notice: Use of undefined constant September - assumed 'September' in /in/vM4PZ on line 3
Notice: Use of undefined constant October - assumed 'October' in /in/vM4PZ on line 3
Notice: Use of undefined constant November - assumed 'November' in /in/vM4PZ on line 3
Notice: Use of undefined constant December - assumed 'December' in /in/vM4PZ on line 3
Notice: Undefined variable: e in /in/vM4PZ on line 4
Notice: Undefined variable: k in /in/vM4PZ on line 6
Notice: Undefined variable: e in /in/vM4PZ on line 9
Notice: Undefined index: in /in/vM4PZ on line 9
Notice: Undefined variable: e in /in/vM4PZ on line 49
1Month 2: February has 28 or 29 days <br>2Month 3: March has 31 days <br>3Month 4: April has 30 days <br>4Month 5: May has 30 days <br>5Month 6: June has 30 days <br>6Month 7: July has 31 days <br>7Month 8: August has 30 days <br>8Month 9: September has 30 days <br>9Month 10: October has 31 days <br>10Month 11: November has 30 days <br>11Month 12: December has 31 days <br>12
Notice: Use of undefined constant January - assumed 'January' in /in/vM4PZ on line 3
Notice: Use of undefined constant February - assumed 'February' in /in/vM4PZ on line 3
Notice: Use of undefined constant March - assumed 'March' in /in/vM4PZ on line 3
Notice: Use of undefined constant April - assumed 'April' in /in/vM4PZ on line 3
Notice: Use of undefined constant May - assumed 'May' in /in/vM4PZ on line 3
Notice: Use of undefined constant June - assumed 'June' in /in/vM4PZ on line 3
Notice: Use of undefined constant July - assumed 'July' in /in/vM4PZ on line 3
Notice: Use of undefined constant August - assumed 'August' in /in/vM4PZ on line 3
Notice: Use of undefined constant September - assumed 'September' in /in/vM4PZ on line 3
Notice: Use of undefined constant October - assumed 'October' in /in/vM4PZ on line 3
Notice: Use of undefined constant November - assumed 'November' in /in/vM4PZ on line 3
Notice: Use of undefined constant December - assumed 'December' in /in/vM4PZ on line 3
Notice: Undefined variable: e in /in/vM4PZ on line 4
Notice: Undefined variable: k in /in/vM4PZ on line 6
Notice: Undefined variable: e in /in/vM4PZ on line 9
Notice: Undefined index: in /in/vM4PZ on line 9
Notice: Undefined variable: e in /in/vM4PZ on line 49
1Month 2: February has 28 or 29 days <br>2Month 3: March has 31 days <br>3Month 4: April has 30 days <br>4Month 5: May has 30 days <br>5Month 6: June has 30 days <br>6Month 7: July has 31 days <br>7Month 8: August has 30 days <br>8Month 9: September has 30 days <br>9Month 10: October has 31 days <br>10Month 11: November has 30 days <br>11Month 12: December has 31 days <br>12
Notice: Use of undefined constant January - assumed 'January' in /in/vM4PZ on line 3
Notice: Use of undefined constant February - assumed 'February' in /in/vM4PZ on line 3
Notice: Use of undefined constant March - assumed 'March' in /in/vM4PZ on line 3
Notice: Use of undefined constant April - assumed 'April' in /in/vM4PZ on line 3
Notice: Use of undefined constant May - assumed 'May' in /in/vM4PZ on line 3
Notice: Use of undefined constant June - assumed 'June' in /in/vM4PZ on line 3
Notice: Use of undefined constant July - assumed 'July' in /in/vM4PZ on line 3
Notice: Use of undefined constant August - assumed 'August' in /in/vM4PZ on line 3
Notice: Use of undefined constant September - assumed 'September' in /in/vM4PZ on line 3
Notice: Use of undefined constant October - assumed 'October' in /in/vM4PZ on line 3
Notice: Use of undefined constant November - assumed 'November' in /in/vM4PZ on line 3
Notice: Use of undefined constant December - assumed 'December' in /in/vM4PZ on line 3
Notice: Undefined variable: e in /in/vM4PZ on line 4
Notice: Undefined variable: k in /in/vM4PZ on line 6
Notice: Undefined variable: e in /in/vM4PZ on line 9
Notice: Undefined index: in /in/vM4PZ on line 9
Notice: Undefined variable: e in /in/vM4PZ on line 49
1Month 2: February has 28 or 29 days <br>2Month 3: March has 31 days <br>3Month 4: April has 30 days <br>4Month 5: May has 30 days <br>5Month 6: June has 30 days <br>6Month 7: July has 31 days <br>7Month 8: August has 30 days <br>8Month 9: September has 30 days <br>9Month 10: October has 31 days <br>10Month 11: November has 30 days <br>11Month 12: December has 31 days <br>12