In my opinion, it's better to assign a default value and initialize the variables, so I choose the second method.
If something goes wrong, you should not worry if your variable ($ x) was initialized or not.
$ value = 10; $ x = ($ value == 10)? "well no";
cirpo source share