Php namespace called default

<?php
namespace default

gives me an inexperienced T_DEFAULT, is there any way around this? Is there a way to avoid a reserved word?

My system uses the name of the current module on my site for a namespace, so it would be nice to be able to use any string as a namespace.

+5
source share
2 answers

You can not use reserved words, such as defaultfor namespaces in PHP, you need to find a workaround ( _default, default_, default1etc?).

+7
source

As @drick says you cannot use the php reserved word for your purpose.

. FYI - ,

0

All Articles