This file contains hidden or 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 | |
// without OB | |
echo 'before_ob' . PHP_EOL; | |
ob_start(); // first level begins | |
// this line will be in $second | |
echo 'second_ob' . PHP_EOL; | |
ob_start(); // second level begins | |
// these 2 lines will be in $first |
This file contains hidden or 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 and use | |
class DefaultController extends Controller | |
{ | |
public function saveAction($listId, $id) | |
{ | |
$list = $this->getDataManager()->getRepository('BiozshockListsBundle:MyList')->find($listId); | |
//FIXME: replace with filter. |
This file contains hidden or 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
#!/usr/bin/php -q | |
<?php | |
if(isset($argv[1]) && strlen($argv[1])) { | |
$file = $argv[1]; | |
}else{ | |
echo 'Please Specify a File'; | |
exit(1); | |
} |
This file contains hidden or 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 | |
class A implements Serializable | |
{ | |
public function serialize() | |
{ | |
$dt = new \DateTime(); | |
return serialize([ | |
$dt, | |
serialize([$dt]) | |
]); |