This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function getName(array $result) | |
{ | |
// resets the array pointer | |
// possibly be bad | |
// but let's say it isn't in this case | |
$firstEntry = reset($result); | |
if (is_array($firstEntry) && isset($firstEntry['name'])) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$i = 0; | |
foreach ($result as $rt_val) { | |
if (!$i) { | |
echo $rt_val['name']; | |
} | |
$i++; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php $i=0; foreach($result as $rt_val) { if(!$i) echo $rt_val['name']; $i++; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Symfony\Component\DependencyInjection\ContainerBuilder; | |
$container = new ContainerBuilder(); | |
// ... set up the container | |
// might be helpful to check if the service is synthetic | |
var_dump($container->getDefinition('my.synthetic.service')->isSynthetic()); // true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if form.vars['errors'] is not empty %} | |
Magic errors display! | |
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
configoptions=" | |
--with-config-file-path=/etc/php54 \ | |
--with-config-file-scan-dir=/etc/php54/php.d \ | |
--with-mysql=mysqlnd \ | |
--with-mysqli=mysqlnd \ | |
--with-pdo-mysql=mysqlnd \ | |
--enable-cli \ | |
--with-pear \ | |
--with-openssl \ | |
--with-iconv \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
configoptions=" | |
--with-config-file-path=/etc/php53 \ | |
--with-config-file-scan-dir=/etc/php53/php.d \ | |
--with-mysql=mysqlnd \ | |
--with-mysqli=mysqlnd \ | |
--with-pdo-mysql=mysqlnd \ | |
--enable-cli \ | |
--with-pear \ | |
--with-openssl=/usr \ | |
--with-iconv \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Acme\DemoBundle\Form; | |
use Symfony\Component\Form\AbstractType; | |
use Symfony\Component\Form\FormBuilderInterface; | |
use Symfony\Component\Form\FormError; | |
use Symfony\Component\Form\Event\DataEvent; | |
use Symfony\Component\Form\FormEvents; | |
use Symfony\Component\OptionsResolver\OptionsResolverInterface; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Acme\DemoBundle\Form; | |
use Symfony\Component\Form\AbstractType; | |
use Symfony\Component\Form\FormBuilderInterface; | |
use Symfony\Component\Form\FormError; | |
use Symfony\Component\Form\FormInterface; | |
use Symfony\Component\Form\FormError; | |
use Symfony\Component\Form\CallbackValidator; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Acme\Demo; | |
// some configuration | |
$all_channels = true; | |
$bot_name = 'TS3 BOT'; | |
$msg = 'Hello World!'; | |
$url = vsprintf('serverquery://username:[email protected]:10011/?server_port=9987&nickname=%s', array( |
NewerOlder