Don’t do that: The following code requires multiple lines (related to the same object) to initialize variables to 0.
1 2 3 4 5 6 7 |
$seconds = 0 $minutes = 0 $hours = 0 $days = 0 $weeks = 0 $months = 0 $years = 0 |
Do that: In this specific case, it’s possible to initialize multiple variables in one line as related to the same object/concept:
$seconds = $minutes = $hours = $days = $weeks = $months = $years = 0
Having one line assignment (related to the same object/concept) could be easier to read that having one assignment per line.
Note: It’s also possible to assign different values to different variables in one line :
$a, $b = 1, 2