Setting default value for $size argument of circle(), square() and rectangle() to an empty string ("") can lead to various issues since it makes the width a string instead of a number.
I suggest you set the default value to 0 instead to avoid any data type issue.
Setting default value for
$size
argument ofcircle()
,square()
andrectangle()
to an empty string (""
) can lead to various issues since it makes the width a string instead of a number.I suggest you set the default value to
0
instead to avoid any data type issue.More on topic: http://hugogiraudel.com/2013/09/03/use-lengths-not-strings/.