Quiz Yourself on Construction Helper Methods

Test your knowledge regarding construction helper methods.

Quiz

1

(True or False) The following method calls produce the same results.


<?php
$replace = [
    'one' => 'one',
    'two' => 'one two',
    'three' => 'one two three'
];

Str::replace(
    array_keys($replace),
    array_values($replace),
    'one two three'
);

Str::swap(
    $replace,
    'one two three'
);
A)

True

B)

False

Question 1 of 50 attempted

Get hands-on with 1200+ tech skills courses.