Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Ce mai faci?
esti
bine?
Trimite mesajul!
Corect: c)
Corect.C
Correct:A
4) $var1="abcdefghijklmnopdqrstuvwxyz";
echo strstr($var1,j,true);
a)abcdefghij
b)abcdefghi
c)jklmnopqrstuvwxyz
d)klmnopdqrstuvwxyz
Correct-b)
strstr(string,search,before_search)
string
search
Required. Specifies the string to search for. If this parameter is a number, it will
character matching the ASCII value of the number
before_searc
h
Optional. A boolean value whose default is "false". If set to "true", it returns the
before the first occurrence of the search parameter.
5) $vara="abcdefgh";
$varb="bc";
Echo strops($vara,$varb,1);
a)1 b)0 c)null d)true e)2
Corect a)
strpos(string,find,start)
string
find
start
a)ce
b)cemai
c)cemaifacimaibaietedeumblicucurcapestrada
d)ce mai faci
Correct)a
strtok(string,split)
string
split
7) $vara="abcdefgh";
echo substr($vara,3,3);
a)def
b)cde
c)defgh
d)cdefg
Correct)a
substr(string,start,length)
string
start
length
A negative number - Start at a specified position from the end of the string
Optional. Specifies the length of the returned string. Default is to the end of the string
Negative number - The length to be returned from the end of the string
// Positive numbers:
echo substr("Hello world",10)."<br>";
echo substr("Hello world",1)."<br>";
echo substr("Hello world",3)."<br>";
echo substr("Hello world",7)."<br>";
echo "<br>";
// Negative numbers:
echo substr("Hello world",-1)."<br>";
echo substr("Hello world",-10)."<br>";
echo substr("Hello world",-8)."<br>";
echo substr("Hello world",-4)."<br>";
d
ello world
lo world
orld
d
ello world
lo world
orld
// Positive numbers:
echo substr("Hello world",0,10)."<br>";
echo substr("Hello world",1,8)."<br>";
echo substr("Hello world",0,5)."<br>";
echo substr("Hello world",6,6)."<br>";
echo "<br>";
// Negative numbers:
echo substr("Hello world",0,-1)."<br>";
echo substr("Hello world",-10,-2)."<br>";
echo substr("Hello world",0,-6)."<br>";
echo substr("Hello world",-2-3)."<br>";
Hello worl
ello wor
Hello
world
Hello worl
ello wor
Hello
world
9) $var32='abcbcedadaa';
echo str_ireplace('a','zzz',$var32,$elemente);
echo $elemente;
a) zabcbcedadaa si 1
b) zzzbcbcedzzzdzzzzzz si 12
c) zzzbcbcedzzzdzzzzzz si 3
d) zzzbcbcedzzzdzzzzzz si 4
10)str_ireplace(find,replace,string,count)(str_replace-case
sensitive)
find
replace
string
count
11) $var32='abc
echo $var32;
rre //!!!
rre
gfr rre
gfr rre //!!!
Hello World!
llo Worl
a)true
c) if(cond) { statement }
d) if(cond)
statement
13)a,b si c
14)
$var1=0;
$var2= something;
$var3= ;
Empty($var); Empty($var1);
a)true true true true
Empty($var2);
Empty($var3);
15)
$var1=0;
$var2= something;
$var3= ;
16)
$var1=0;
$var2= something;
$var3= 342;
Is_numeric($var); is_numeric($var1);
is_numeric($var3);
a)true true true true
b)false false false false
c)true true false true
d)true false false true
is_numeric($var2);