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 topla($sayi1, $sayi2){ | |
return $sayi1 + $sayi2; | |
} | |
$topla = function($sayi1, $sayi2){ | |
return $sayi1 + $sayi2; | |
}; |
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 dizi_filtrele($callback, $arr) | |
{ | |
$result = []; | |
if (is_callable($callback) && is_array($arr)){ | |
foreach($arr as $key => $val){ | |
$result[] = call_user_func($callback, $val); | |
} | |
} |
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 Hata extends Exception { | |
public function printJSON() | |
{ | |
$arr = [ | |
'mesaj' => $this->message, | |
'kod' => $this->code, | |
'satir' => $this->line, |
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 | |
/* | |
Plugin Name: Custom Registration | |
Description: Updates user rating based on number of posts. | |
Version: 1.1 | |
Author: Tristan Slater w/ Agbonghama Collins | |
Author URI: http://kanso.ca | |
*/ |
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
function factorial(number){ | |
var value = number; | |
for ( var i = number; i > 1; i-- ){ | |
value *= i - 1; | |
} | |
return value; | |
}; | |
function combination(n, r){ | |
if ( n == r ) return 1; |
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 | |
/** | |
* @param $imdbID | |
* @param $season | |
* @return array | |
*/ | |
function imdbEpisode($imdbID, $season) | |
{ |
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
CKEDITOR.replace('editor', { | |
enterMode: CKEDITOR.ENTER_DIV, | |
allowedContent: 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
<?php | |
/** | |
* @param $bytes | |
* @return string | |
*/ | |
function formatSizeUnits($bytes) | |
{ | |
if ($bytes >= 1073741824) { | |
$bytes = number_format($bytes / 1073741824, 2) . ' GB'; |
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 | |
$countries = array | |
( | |
'AF' => 'Afghanistan', | |
'AX' => 'Aland Islands', | |
'AL' => 'Albania', | |
'DZ' => 'Algeria', | |
'AS' => 'American Samoa', | |
'AD' => 'Andorra', |
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 | |
/** | |
* @param null $ip | |
* @param string $purpose | |
* @param bool|TRUE $deep_detect | |
* @return array|null|string | |
*/ | |
function ip_info($ip = NULL, $purpose = "location", $deep_detect = TRUE) | |
{ |