<?php
$string = 'abCd';
$offset = 2;
function checkAndChangeCase($string, $offset) {
$char = mb_strtoupper($string{$offset});
if ($string{$offset} !== $char) {
$string{$offset} = $char;
}
return $string;
}
echo checkAndChangeCase($string, $offset);
function tratata(){
var that = this;
this.draw = function(){
that.figure=function(){}
}
}
Спасибо