if( function_exists( 'get_city' ) ) { ( new ReflectionFunction('get_city') )->getFileName(); }
$array = [
'user_id' => 'integer',
'currency' => 'float',
'price' => 'float',
];
$targetArray = $_POST;
foreach( $array as $name => $dataType ) {
if( isset( $targetArray[$name] ) ) {
settype( $targetArray[$name], $dataType );
}
}
define( 'TEST_CONST', '123qwe' );
$test = [ TEST_CONST, TEST_CONST2 ];
var_dump( $test );
array(2) {
[0]=>
string(6) "123qwe"
[1]=>
string(11) "TEST_CONST2"
}
//ид подключения
$idInclude=$allModule['id_rang'];
//ид подключенного модуля в ранге
$idModule=$allModule['rang'];
function fetchRow() {
return mysqli_fetch_row($this->resQuery);
}
foreach( $db->fetchRow() as $row ){}
// или
while( $row = $db->fetchRow() ) {}
$content = file_get_contents( 'http://remote-server.com/image.jpeg' );
header( 'Content-type: image/jpeg;' );
die( $content );
print $object->Body->TXLife->TXLifeResponse->TransResult->ResultInfo->ResultInfoDesc; // RANSACTION_ID: bUpsrjeCwyJcwRp9Q3pLbrcwCU8=
<?php
$data = 'my secrect string...';
$key = md5( 'passwd123' );
$crypted = $data ^ str_pad( '', strlen( $data ), $key );
print_r( $crypted ); // \HGZPLCE_VTJ
$decrypted = $crypted ^ str_pad( '', strlen( $crypted ), $key );
print_r( $decrypted ); // my secrect string...
// меняем пасс
$decrypted = $crypted ^ str_pad( '', strlen( $crypted ), md5( 'passwd321' ) );
print_r( $decrypted ); // m{r"6<"ae{zw+poc0u)
<?php
define( 'IS_INDEX', true );
//
include_once 'header.php';
<?php defined( 'IS_INDEX' ) || die( 'access denied' ); ?>
$listings = $iaDb->all(iaDb::ALL_COLUMNS_SELECTION, "`model_id` IN (". join( ', ', $parrentIds ) .")", 0, 20, 'autos');
print preg_replace( '/^(\d{3})(\d+)$/iu', '+7($1)$2', '921123456789' ); // +7(921)123456789