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 | |
class ClosureTest { | |
public $getInfo; | |
public function __construct() { | |
$this->getInfo = function() { | |
$this->getCity(); // Bu satir PHP 5.3'te Fatal Error verecektir. | |
return 'Ben şehir bilgisini getiren metottan sonra çağırıldım.'; |
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 | |
/** | |
* Tests of DependencyInjection.php | |
*/ | |
class ControllerTest extends PHPUnit_Framework_TestCase { | |
public function setUp() { | |
$this->obj = new Controller; |
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 | |
/** | |
* Looking for tests DependencyInjectionTest.php | |
*/ | |
require_once 'vendor/autoload.php'; | |
interface iCurrency { | |
public function getExchangeRate(); |
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 | |
// Iki zaman arasinda 10 dk atlayarak veri olusturma | |
$hourRange = range(strtotime('00:00'), strtotime('23:50'), 10 * 60); | |
foreach($hourRange as $time){ | |
$date = date("H:i",$time); | |
echo $date . "\n"; | |
} |
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\BlogBundle\Entity; | |
use Doctrine\ORM\Mapping as ORM; | |
/** | |
* Post | |
* | |
* @ORM\Table() |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <linux/seccomp.h> | |
#include <sys/prctl.h> | |
void main() { | |
FILE *filePoint; | |
filePoint = fopen("/tmp/test.txt", "a"); |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <linux/seccomp.h> | |
#include <sys/prctl.h> | |
void main() { | |
FILE *filePoint; | |
filePoint = fopen("/tmp/test.txt", "a"); |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <linux/seccomp.h> | |
#include <seccomp.h> | |
#include <sys/prctl.h> | |
void main() { | |
FILE *filePoint; | |
filePoint = fopen("/tmp/test.txt", "a"); |
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
#include <stdio.h> | |
#include <sys/utsname.h> | |
#include <seccomp.h> | |
void main() { | |
puts("What's up?"); | |
scmp_filter_ctx ctx; | |
ctx = seccomp_init(SCMP_ACT_ALLOW); | |
seccomp_rule_add(ctx, SCMP_ACT_KILL, SCMP_SYS(uname), 0); |
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
#include <stdio.h> | |
#include <sys/utsname.h> | |
void main() { | |
puts("What's up?"); | |
struct utsname unameData; | |
uname(&unameData); | |
printf("%s \n", unameData.sysname); | |
} |