Use object cloning to duplicate a locale object exactly and efficiently. Most locale-aware methods also accept string representations of locales, such as the result of $locale->toString().
Example 532. clone
<?php
$locale = new Zend_Locale('ar');
// Save the $locale object as a serialization
$serializedLocale = $locale->serialize();
// re-create the original object
$localeObject = unserialize($serializedLocale);
// Obtain a string identification of the locale
$stringLocale = $locale->toString();
// Make a cloned copy of the $local object
$copiedLocale = clone $locale;
print "copied: ", $copiedLocale->toString();
// PHP automatically calls toString() via __toString()
print "copied: ", $copiedLocale;




