3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $social_array = array( "facebook" => array( 'class' => "facebook", 'url' => 'https://www.facebook.com/', 'handle' => 'Mage::getStoreConfig(\'social_code/social_group/twitter_field\')' ), "twitter" => array( 'class' => "facebook", 'url' => 'https://www.facebook.com/', 'handle' => 'Mage::getStoreConfig(\'social_code/social_group/twitter_field\')' ), "linked-in" => array( 'class' => "facebook", 'url' => 'https://www.facebook.com/', 'handle' => 'Mage::getStoreConfig(\'social_code/social_group/twitter_field\')' ), "google-plus" => array( 'class' => "facebook", 'url' => 'https://www.facebook.com/', 'handle' => 'Mage::getStoreConfig(\'social_code/social_group/twitter_field\')' ) ); $html = '<ul>'; foreach ($social_array as $name => $class_array){ $html .= '<li><a href="' . $class_array['url'] . $class_array['handle'] .'" class="' . $class_array['class']. '">'. $name. '</a></li>'; } $html .= '</ul>'; print $html; ?>
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
<ul><li><a href="https://www.facebook.com/Mage::getStoreConfig('social_code/social_group/twitter_field')" class="facebook">facebook</a></li><li><a href="https://www.facebook.com/Mage::getStoreConfig('social_code/social_group/twitter_field')" class="facebook">twitter</a></li><li><a href="https://www.facebook.com/Mage::getStoreConfig('social_code/social_group/twitter_field')" class="facebook">linked-in</a></li><li><a href="https://www.facebook.com/Mage::getStoreConfig('social_code/social_group/twitter_field')" class="facebook">google-plus</a></li></ul>