What will the following code print out?
$str = '✔ one of the following';
echo str_replace('✔', 'Check', $str);
Suggested Answer: B
Get Premium 200-710 Questions
as Interactive Web-Based Practice Test or PDF
Real Exam Format
Detailed Explanations
Instant Access
Get Your Practice Test
23 comments · newest first
IN
In
12 months ago
No way, I thought it would return the HTML entity!
TI
Tiera
12 months ago
Wait, is that a real character code?
LA
Lashaunda
1 year ago
I thought it would just show the original string.
JU
Jutta
1 year ago
Definitely A, that's the right answer!
EM
Emilio
1 year ago
It will print "Check one of the following".
KE
Kelvin
1 year ago
I’m a bit confused about the encoding. Does str_replace handle HTML entities like that? I might be leaning towards option C.
DI
Diane
1 year ago
This seems similar to a practice question we did on string replacement. I feel like it should definitely output "Check one of the following".
RO
Rodrigo
1 year ago
I'm not entirely sure, but I remember something about HTML entities. Could it be that it doesn't replace it correctly?
LA
Laila
1 year ago
I think the code replaces the checkmark with "Check", so it should print option A.
CL
Clorinda
1 year ago
I'm a bit confused by this question. It seems like there are a lot of different factors to consider, and I'm not sure which ones are the most important for the value proposition. I'll need to re-read the question and options carefully.
TE
Teri
1 year ago
I'm pretty confident I know the components of an elastic cloud server. Let me think this through.
BE
Ben
1 year ago
Hmm, I'm a bit confused. If the contribution margin is 12,000 and the overheads are 23,000, wouldn't closing the department decrease operating income by 12,000? I'm not sure about the 4,000 that can't be eliminated.
RE
Reid
1 year ago
I'm kind of confused about the substantial financial risk formula. I think it has to do with how much of the payments are contingent on costs, but I'm not sure about the exact percentages.
LE
Leonie
1 year ago
Hmm, I'm a bit confused. The question mentions preventing a user from permanently deleting private chats, but the solution talks about creating an In-Place Hold for the user's OneDrive for Business site. I'm not sure those two things are directly related.
OR
Oretha
1 year ago
Hmm, let me think about this... Ah, I got it! The answer is A) Check one of the following. The str_replace() function is doing its job correctly.
BU
Burma
1 year ago
Haha, this question is a piece of cake! The answer is clearly A) Check one of the following. I can't believe someone would mess up something this simple.
WA
Wava
1 year ago
The answer is A) Check one of the following for sure.
AL
Alona
1 year ago
I think it's A) Check one of the following too.
KE
Kenia
1 year ago
Yeah, that's an easy one. It's A) Check one of the following.
OZ
Ozell
1 year ago
I agree, it's definitely A) Check one of the following.
AL
Alison
2 years ago
I'm not sure, but I think it will print A) Check one of the following as well.
RO
Rossana
2 years ago
I agree with Hyman, because the code is replacing '✔' with 'Check'.
HY
Hyman
2 years ago
I think it will print A) Check one of the following.