$jregistry = new JRegistry(); $jregistry->set('mykey', 'myvalue'); $value = $jregistry->get('mykey'); echo $value; // outputs 'myvalue'This code creates a new `JRegistry` instance, sets a key-value pair with `set()`, retrieves the value with `get()`, and outputs it to the screen. JRegistry is part of the Joomla CMS package library.