Category Archives: Freelancer Guide/Support

US English – Level 1 Exam Answers for Freelancers

US English – Level 1 Exam Answers for Freelancers

#100 Question:

John writes very _____.
  • best
  • better
  • good
  • much good
  • well

Answer: well

#101 Question:

You _______ drink lots of water.
  • ever
  • make
  • should
  • take
  • will be

Answer: should

#102 Question:

The lava was moving very _______.
  • more slow
  • more slowly
  • slower
  • slowest
  • slowly

Answer: slowly

#103 Question:

_______ were older than we were.
  • All them
  • He
  • It
  • She
  • They

Answer: They

#104 Question:

I drive Sherry to the park, where _______ plays softball.
  • She
  • she
  • she can
  • she will
  • they

Answer: she

#105 Question:

The mirror was __________.
  • break
  • broke
  • broke apart
  • broken
  • crack

Answer: broken

#106 Question:

Sticks and stones may break _______ bones.
  • him
  • mine
  • my
  • people
  • there

Answer: my

#107 Question:

Please close the door _________ the furnace is running.
  • are
  • cause
  • in case
  • or
  • while

Answer: while

#108 Question:

You _______ have six cookies.
  • are
  • may
  • may be
  • maybe
  • might be

Answer: may

#109 Question:

We know smoking ___________ cancer.
  • because
  • cause
  • cause of
  • causes
  • make

Answer: causes

#110 Question:

Don’t ever do that __________!
  • again
  • hear
  • not again
  • some more
  • their

Answer: again

#111 Question:

This mattress is soft, _________ firm.
  • but
  • through
  • to
  • too
  • very

Answer: but

#112 Question:

The vine __________ around the tree.
  • have rapped
  • rapped
  • rapt
  • wrap
  • wrapped

Answer: wrapped

#113 Question:

My life is ___________ organized than before.
  • more
  • more from
  • more of
  • most
  • mostly

Answer: more

#114 Question:

We let the frog go, _____________ caught it again.
  • after
  • before
  • but could
  • then
  • we

Answer: then

#115 Question:

There are three ___________ in the parlor.
  • ladie’s
  • ladies
  • lady’s
  • ladys
  • woman

Answer: ladies

#116 Question:

Most wines are made _________ grapes.
  • as
  • at
  • from
  • into
  • on

Answer: from

#117 Question:

I _______ find my car keys.
  • can’t
  • didn’t have
  • have
  • have not
  • haven’t

Answer: can’t

#118 Question:

Ouch__ That really hurt!
  • ! (exclamation mark)
  • “(quotation mark)
  • , (comma)
  • : (colon)
  • ; (semicolon)

Answer: ! (exclamation mark)

#119 Question:

A comma should normally be immediately followed by a __________.
  • dash
  • new paragraph
  • period
  • quotation mark
  • space

Answer: space

#120 Question:

Is her hair black ________ brown?
  • but
  • from
  • or
  • to
  • was

Answer: or

#121 Question:

Please put this back __________ it came from.
  • to
  • we’re
  • were
  • where
  • which

Answer: where

#122 Question:

Don’t be such _______ sore loser!
  • a
  • an
  • as
  • the
  • very

Answer: a

#123 Question:

The desk will move very _________.
  • easier
  • easiest
  • easily
  • easy
  • much easy

Answer: easily

#124 Question:

Come over ________ right now!
  • hear
  • here
  • there
  • to hear
  • to here

Answer: here

#125 Question:

Our visitor was from ___________.
  • England
  • england
  • far
  • scotland
  • their

Answer: England

#126 Question:

If you overfill the bag it will ________.
  • tear
  • tore
  • tore open
  • torn
  • torn open

Answer: tear

#127 Question:

There was nothing we ____________ do about the rain.
  • can
  • can’t
  • could
  • will
  • won’t

Answer: could

#128 Question:

_________ man should have at least one pair of shoes.
  • All
  • Every
  • Most
  • Mostly every
  • Usually

Answer: Every

#129 Question:

Underneath the pillow _________ a pistol.
  • found
  • have been
  • stood
  • was
  • were

Answer: was

#130 Question:

Can I _________ this jacket?
  • bi
  • boy
  • buy
  • by
  • bye

Answer: buy

#131 Question:

I ________ go to the bathroom.
  • already
  • got to
  • half to
  • have to
  • need

Answer: have to

#132 Question:

Are you ever going to finish that paper__
  • ! (exclamation mark)
  • , (comma)
  • . (period)
  • : (colon)
  • ? (question mark)

Answer: ? (question mark)

#133 Question:

The girl screamed, “Don’t do this__”
  • ! (exclamation mark)
  • , (comma)
  • : (colon)
  • ; (semicolon)
  • ? (question mark)

Answer: ! (exclamation mark)

#134 Question:

I will ___ dining out tonight.
  • be
  • do
  • for
  • have
  • not

Answer: be

#135 Question:

Driving safely takes _________ practice.
  • every
  • lots
  • lots of
  • plenty
  • very

Answer: lots of

#136 Question:

Be sure you get to school _______ time.
  • all
  • at
  • by
  • on
  • when

Answer: on

#137 Question:

Don’t take your anger out ____ me!
  • by
  • from
  • in
  • on
  • to

Answer: on

#138 Question:

_______ be warmer when we get inside.
  • We all
  • We’ll
  • Will
  • we’ll
  • well

Answer: We’ll

#139 Question:

This is a better plan for you and _____.
  • I
  • Me
  • me
  • she
  • they

Answer: me

#140 Question:

When it rains, __________ pours.
  • and its
  • it
  • it may
  • it’s
  • its

Answer: it

#141 Question:

There is ____________ one way into that canyon.
  • each
  • nearly
  • only
  • only just
  • round

Answer: only

#142 Question:

Does anyone ___________ the answer?
  • found
  • got
  • has
  • have known
  • know

Answer: know

#143 Question:

At the edge of the trail there was a _________ cliff.
  • shear
  • sheared
  • sheer
  • sheerest
  • sheerly

Answer: sheer

#144 Question:

Time ________ space are relative.
  • an
  • and
  • from
  • to
  • with

Answer: and

#145 Question:

We will __________ you to the house.
  • after
  • behind
  • come at
  • flow
  • follow

Answer: follow

#146 Question:

I’ve asked you this question many times__
  • ” (quotation mark)
  • ‘ (quotation mark)
  • . (period)
  • ; (semicolon)
  • ? (question mark)

Answer: . (period)

#147 Question:

A/an ___________ is most commonly used to indicate a short pause.
  • apostrophe
  • colon
  • comma
  • period
  • slash

Answer: comma

#148 Question:

Krista always works ________ hard.
  • great
  • outstanding
  • slyly
  • surely
  • very

Answer: very

#149 Question:

Exercise ____ good for you.
  • are
  • do
  • is
  • were
  • will

Answer: is

#150 Question:

The pin slides _______ the hole.
  • an
  • at
  • in too
  • into
  • unto

Answer: into

#151 Question:

I _______ my shoes at the door last night.
  • did left
  • have left
  • leave
  • left
  • will leave

Answer: left

#152 Question:

My teacher says ____________ makes perfect.
  • Everyone
  • Practice
  • all
  • nobody
  • practice

Answer: practice

#153 Question:

Nineteen is an __________ number.
  • odd
  • oddly
  • round
  • strange
  • weird

Answer: odd

#154 Question:

The ____________ scales are colorful.
  • guppie’s
  • guppies
  • guppy fishe’s
  • guppy’s
  • guppys

Answer: guppy’s

#155 Question:

We are all created ___________.
  • best
  • equal
  • more
  • most
  • same

Answer: equal

#156 Question:

I don’t have __________ apples.
  • any
  • every
  • lots
  • much
  • no

Answer: any

#157 Question:

Please don’t take more _________ you need.
  • for
  • of
  • of then
  • than
  • then

Answer: than

#158 Question:

Mind your manners ________ you want cake.
  • do
  • if
  • of
  • or
  • or else

Answer: if

#159 Question:

Let’s start __________ the beginning.
  • at
  • in
  • over
  • to
  • while

Answer: at

#160 Question:

First mix the dry ingredients, _______ add water.
  • after
  • before
  • just
  • than
  • then

Answer: then

#161 Question:

The lake is over ________.
  • hear
  • their
  • then
  • there
  • they’re

Answer: there

#162 Question:

________ was nothing to do at the party.
  • Here
  • Their
  • There
  • their
  • there

Answer: There

#163 Question:

Choose the most correct option to fill in the blank: While I was away I _______ the flu.
  • had
  • has
  • has had
  • have
  • have had

Answer: had

#164 Question:

Now that __________ arrived, let’s get started!
  • we of
  • we’re
  • we’ve
  • weave
  • were

Answer: we’ve

#165 Question:

If pain doesn’t kill you, _________ makes you stronger.
  • it
  • it can
  • it will
  • it’s
  • its

Answer: it

#166 Question:

Please tell your mother ________ sorry.
  • I
  • I’m
  • i
  • is
  • very

Answer: I’m

#167 Question:

We’ll be back ___________ you know it!
  • after which
  • as if
  • before
  • until
  • up to

Answer: before

#168 Question:

May I sit ________ you at the theater?
  • along
  • around
  • aside
  • beside
  • to

Answer: beside

#169 Question:

You shouldn’t drink __________ singing.
  • if you
  • wall
  • when you
  • while
  • while your

Answer: while

#170 Question:

The purpose of the ___________ is to stop the car.
  • braked
  • brakes
  • break
  • breaking
  • breaks

Answer: brakes

#171 Question:

It __________ matter if we stay another day.
  • ain’t
  • don’t
  • isn’t
  • not
  • won’t

Answer: won’t

#172 Question:

The peas _______ not cooked.
  • did
  • we’re
  • weir
  • were
  • where

Answer: were

#173 Question:

My kitchen is a _______; I need to clean it.
  • dirty
  • mess
  • messed
  • messy
  • mistake

Answer: mess

#174 Question:

It doesn’t ________ much to ride the bus.
  • bill
  • cost
  • price
  • purchase
  • spend

Answer: cost

US English – Level 1 Exam Answers for Freelancers

#51 Question:

I can buy my groceries ___________ here.
  • cheap
  • cheaply
  • cheep
  • more cheap
  • most cheep

Answer: cheaply

#52 Question:

Trees are one of my favorite _________.
  • item
  • living thing
  • plant
  • thing
  • things

Answer: things

#53 Question:

Bruce Lee __________ martial arts.
  • has teach
  • know
  • practice
  • practiced
  • teach

Answer: practiced

#54 Question:

That price is for _________ apple, not per pound.
  • all
  • each
  • many
  • total
  • whole

Answer: each

#55 Question:

Ten dollars was the ____________ I ever made.
  • all
  • more
  • most
  • most of
  • mostest

Answer: most

#56 Question:

The wind was high ___________ the storm.
  • because of
  • because while
  • cause
  • cause of
  • on account

Answer: because of

#57 Question:

Please don’t talk ___________ your mouth full.
  • if
  • when
  • where
  • while
  • with

Answer: with

#58 Question:

Matches can __________ dangerous.
  • be
  • cause
  • find
  • make
  • make some

Answer: be

#59 Question:

When the lizard grows, _____ sheds its skin.
  • He
  • he
  • it
  • it’s
  • she

Answer: it

#60 Question:

Dad was laid off, but _______ will find work soon.
  • He
  • he
  • it
  • might
  • they

Answer: he

#61 Question:

Bob kept working, but didn’t enjoy _______.
  • him
  • himself
  • his self
  • it’s self
  • itself

Answer: himself

#62 Question:

There were __________ in the aquarium.
  • guppees
  • guppie’s
  • guppies
  • guppy’s
  • guppys

Answer: guppees

#63 Question:

October can be very ___________ here.
  • cold
  • colder
  • coldest
  • coldly
  • most cold

Answer: cold

#64 Question:

Will you ________ me to the fair?
  • do with
  • go
  • take
  • taken
  • taking

Answer: take

#65 Question:

We ________ there in the morning.
  • be
  • be to
  • been
  • getting
  • will be

Answer: will be

#66 Question:

This isn’t that hard__ my son did it yesterday.
  • ! (exclamation mark)
  • , (comma)
  • . (period)
  • : (colon)
  • ; (semicolon)

Answer: ; (semicolon)

#67 Question:

Would you like more soup_
  • !
  • ,
  • .
  • :
  • ?

Answer: ?

#68 Question:

Ouch__ That really hurt!
  • ! (exclamation mark)
  • “(quotation mark)
  • , (comma)
  • : (colon)
  • ; (semicolon)

Answer:  ! (exclamation mark)

#69 Question:

The stove is _________ to the refrigerator.
  • against
  • away
  • far
  • next
  • out

Answer: next

#70 Question:

When you go, may ____ come with you?
  • I
  • be
  • can
  • i
  • not

Answer: I

#71 Question:

____ are going to the theater.
  • Everyone
  • I
  • It
  • She
  • We

Answer: We

#72 Question:

It’s better to give ________ to receive.
  • than
  • that
  • then
  • there
  • this

Answer: than

#73 Question:

Of all the employees, Bob tried the _________.
  • harder
  • hardest
  • more hard
  • most hard
  • most hardest

Answer: hardest

#74 Question:

Please put the leftovers ____ the refrigerator.
  • at
  • in
  • of
  • out
  • to

Answer: in

#75 Question:

I counted ________ person at the dance.
  • all
  • all of
  • every
  • total
  • whole

Answer: every

#76 Question:

Joe ______ quickly to the bus stop.
  • did ran
  • has ran
  • ran
  • run
  • runned

Answer: ran

#77 Question:

I would like to go shopping, ______.
  • 2
  • to
  • too
  • tow
  • two

Answer: too

#78 Question:

__________ of the earth is covered with water.
  • About
  • Great
  • Many
  • Much
  • lots

Answer: Much

#79 Question:

Only six students ___________ this course last year.
  • have passed
  • have past
  • passed
  • past
  • will pass

Answer: passed

#80 Question:

I try _______ be friendly to my neighbors.
  • always
  • and
  • for
  • to
  • too

Answer: to

#81 Question:

The leather glove is old and ____________.
  • crack
  • cracked
  • has crack
  • has tore
  • have cracks

Answer: cracked

#82 Question:

The glass ___________ apart violently.
  • broke
  • broke from
  • has broke
  • have broke
  • have broken

Answer:have broken

#83 Question:

We can’t ____________ go back there again.
  • always
  • ever
  • every
  • never
  • not never

Answer: ever

#84 Question:

That was a __________ stop!
  • more fast
  • quick
  • quicken
  • quickest
  • quickly

Answer: quick

#85 Question:

Paul is tall, but ______ isn’t very thin.
  • He
  • he
  • him
  • it
  • so

Answer: he

#86 Question:

Calcium is _______ important supplement.
  • a
  • an
  • and
  • real
  • very

Answer: an

#87 Question:

You should only take this drug if _______ prescribed by a doctor.
  • it
  • it’s
  • its
  • they are
  • when

Answer: it’s

#88 Question:

I placed fifth in the _________ race.
  • either
  • last
  • most
  • most fastest
  • speedily

Answer: last

#89 Question:

The river is _____________ here than I remember.
  • most wide
  • the most wide
  • wide
  • wider
  • widest

Answer: wider

#90 Question:

The answers are in the back _____ the book.
  • as
  • from
  • in
  • of
  • to

Answer: of

#91 Question:

I have ___________ experience in this field.
  • greatest
  • lots
  • many
  • most
  • much

Answer: much

#92 Question:

That’s the last one we _____________.
  • got
  • gotten
  • have
  • have got
  • will

Answer: have

#93 Question:

Eight divided ____________ two equals four.
  • at
  • by
  • from
  • into
  • to

Answer: by

#93 Question:

Eight divided ____________ two equals four.
  • at
  • by
  • from
  • into
  • to

Answer: by

#94 Question:

My dog followed the burglar’s ________.
  • cent
  • scent
  • sense
  • senses
  • sent

Answer: scent

#95 Question:

I ________ forgotten my wallet.
  • did
  • just
  • must have
  • must of
  • won’t

Answer: must have

#96 Question:

Was that a cry for help___
  • ! (exclamation mark)
  • , (comma)
  • . (period)
  • : (colon)
  • ? (question mark)

Answer: ? (question mark)

#97 Question:

Could we please get to work now___
  • ! (exclamation mark)
  • ” (quotation mark)
  • . (period)
  • : (colon)
  • ? (question mark)

Answer: ? (question mark)

#98 Question:

I’ve told you twice_ Please don’t ask again.
  • , (comma)
  • . (period)
  • : (colon)
  • ; (semicolon)
  • ? (question mark)

Answer: . (period)

#99 Question:

If she doesn’t call back soon, _______ should call her again.
  • You
  • my
  • you
  • you’re
  • your

Answer: you

US English – Level 1 Exam Answers for Freelancers

US English – Level 1 Exam Answers for Freelancers

#1 Question:

David would rather quit ________ get fired.
  • after
  • before
  • than
  • then
  • while

Answer: than

#2 Question:

They were _______ tall for the doorway.
  • 2
  • to
  • too
  • tow
  • two

Answer: too

#3 Question:

The stove is _________ to the refrigerator.
  • away
  • far
  • next
  • opposite
  • out

Answer: next

#4 Question:

Our team won _______ game.
  • every
  • in
  • soccer
  • there
  • third

Answer: every

#5 Question:

The boys put ________ dirty clothes in the washer.
  • There
  • his
  • their
  • them
  • there

Answer: their

#6 Question:

You _______ an excellent student.
  • are
  • can
  • is
  • was
  • will

Answer: are
#7 Question:

Most people learn better __________ doing.
  • at
  • by
  • bye
  • then
  • where

Answer: by

#8 Question:

Can you ________ the music?
  • hear
  • hear much
  • here
  • here much
  • tell

Answer: hear

#9 Question:

Take your hands out ___ your pockets.
  • at
  • from
  • from in
  • of
  • to

Answer: from

#10 Question:

If you try ________ you will succeed.
  • difficult
  • hard
  • hardly
  • hardness
  • more hard

Answer: hard

#11 Question:

If Jerry were taller, he _________ play basketball.
  • can
  • doesn’t
  • may
  • will
  • would

Answer: would

#12 Question:

James _________ off the roof.
  • fall
  • fallen
  • falling
  • fell
  • has fell

Answer: fell
#13 Question:

There is no need to ____ angry.
  • be
  • being
  • come
  • do
  • go

Answer: be

#14 Question:

I ______ a pain in my arm.
  • am have
  • half
  • has
  • have
  • having

Answer: have

#15 Question:

Trust your instincts ______ you’ll be alright.
  • and
  • and so
  • cause
  • for
  • if

Answer:and
#16 Question:

When did you plan _____ leave?
  • from
  • to
  • too
  • tow
  • two

Answer:to
#17 Question:

Talk to your doctor __________ changing medications.
  • around
  • before
  • into
  • next to
  • prior

Answer: before

#18 Question:

The bird flapped ________ wings briskly.
  • all
  • it’s
  • its
  • their
  • there

Answer: its

#19 Question:

Please close the door, _________ the furnace will run.
  • are
  • cause
  • in case
  • or
  • while

Answer: in case

#20 Question:

A valley is a low _________ area.
  • laying
  • lie-ing
  • lieing
  • lyeing
  • lying

Answer: lying

#21 Question:

Buckingham ______________ is a popular tourist attraction.
  • Palace
  • open
  • palace
  • place
  • sure

Answer: Palace

#22 Question:

I ________ worked on a railroad.
  • has never
  • have ever
  • have never
  • not ever
  • not never

Answer: have never

#23 Question:

The door opens ___________.
  • into
  • left
  • out
  • outward
  • to the out

Answer: outward

#24 Question:

Cecil took the long way _________ the house.
  • around
  • for
  • of
  • on
  • outside

Answer: around

#25 Question:

Where there’s a will, ___________ a way.
  • their’s
  • theirs
  • there’s
  • theres
  • they’s

Answer: there’s

#26 Question:

The leaves on this tree turn red _____ the Fall.
  • at
  • in
  • on
  • when
  • while

Answer: in

#27 Question:

I know nothing __________ mushrooms.
  • about
  • around
  • in
  • into
  • over

Answer: about

#28 Question:

________ you go to the beach yesterday?
  • Did
  • Do
  • Does
  • If
  • Will

Answer: Did

#29 Question:

Jeff and Marie went __________ hunting.
  • dear
  • deer
  • to
  • to dear
  • to deer

Answer: deer

#30 Question:

Can we go to _________ party?
  • Jerrys
  • an
  • birthday
  • the
  • there

Answer: the

#31 Question:

You got yourself ________ this mess; get yourself out.
  • at
  • by
  • for
  • from
  • into

Answer: into

#32 Question:

May I please go __________ for some fresh air?
  • about
  • from in
  • into
  • outside
  • to outside

Answer: outside

#33 Question:

Summer is my favorite season of _______ year.
  • an
  • best
  • new
  • that
  • the

Answer: the

#34 Question:

Put the books on the correct __________, please.
  • shelf’s
  • shelfs
  • shelve
  • shelve’s
  • shelves

Answer: shelves

#35 Question:

We need to get ______ at the next stop.
  • into
  • off
  • outer
  • over
  • toward

Answer: off

#36 Question:

If you break something_ you must pay for it.
  • ! (exclamation mark)
  • , (comma)
  • . (period)
  • : (colon)
  • ; (semicolon)

#37 Question:

I like fishing__ hunting and playing football.
  • ! (exclamation mark)
  • , (comma)
  • . (period)
  • : (colon)
  • ; (semicolon)

Answer: , (comma)

#38 Question:

I’ve asked you this question many times__
  • ” (quotation mark)
  • . (period)
  • : (colon)
  • ; (semicolon)
  • ? (question mark)

Answer: . (period)

#39 Question:

Can we please get to work now___
  • ! (exclamation mark)
  • ” (quotation mark)
  • . (period)
  • : (colon)
  • ? (question mark)

Answer: ? (question mark)

#40 Question:

A statement should end with a ___________.
  • colon
  • comma
  • exclamation mark
  • period
  • question mark

Answer: period

#41 Question:

This assignment is ________ responsibility.
  • him
  • there
  • yore
  • you’re
  • your

Answer: your

#42 Question:

Make a left ______ at the light.
  • out
  • over
  • quick
  • side
  • turn

Answer: turn

#43 Question:

I like it __________ it rains.
  • by
  • for
  • when
  • which
  • will

Answer: when

#44 Question:

Jodi is very _______.
  • best
  • much nice
  • nice
  • nicer
  • nicest

Answer: nice

#45 Question:

We have about an ________ to go.
  • day
  • hour
  • minute
  • our
  • second

Answer: hour

#46 Question:

I fell ___________ the sidewalk was icy.
  • because
  • because of
  • by
  • to
  • why

Answer: because

#47 Question:

The bus and the train _____ slower than flying.
  • are
  • is
  • is both
  • our
  • will

Answer: are

#48 Question:

We left ______ swimming suits at home.
  • hour
  • our
  • that
  • them
  • there

Answer: our

#49 Question:

________ never make it work that way.
  • As you’ll
  • He
  • Might
  • You probably
  • You’ll

Answer: You’ll

#50 Question:

I think _______ broken my arm.
  • Doug
  • I’ve
  • he
  • i may have
  • i’ve

Answer: I’ve

PHP Level 1 Exam Q&A for Freelancers

PHP Level 1 Exam Q&A

Hello Everyone,
If you are going to take PHP LEVEL 1 Exam in freelancer.com, first of all please study following questions. There are 203 questions listing here. You will be able to take more than 90% marks definitely if you follow this post.

1) Which function returns (and caches) the owner ID number?
fileowner()2) Which of the following is the correct way to implement a do-while loop?
$j=0; do { print “$j”; } while ($j > 0);

3)Which statement will skip the rest of the current loop iteration and continue execution at the beginning of next iteration.
continue

4) Which of the following is correct to show a message for an exception?
throw new Exception (“Invalid data”);

5) What term refers to the ability to shorten Extra_Long_Names improving readability of source code?
Aliasing

6) Which operator performs the same function as x=x%y?
%=

7)The control error operator is:
@

8)Which of the following is the not equal operator?
!=

9) What are the levels of visibility possible for a variable or method?
Public, Private and Protected

10) Which Perl Compatible Regex function takes a regex pattern as first argument, a string to match against as second argument, and an optional array variable for returned matches?
preg_grep

11) Which Perl Compatible Regex function inserts escape characters into strings that are intended for use as regex patterns.
preg_quote

12)Which of the following shifts the bits of $a $b steps to the left?
$a << $b

13) What PHP function returns the arctangent in radians of a numerical argument?
atan()

14) Which function is used to start tracking a user?
session_start();

15) What statement will delete session files?
session_destroy();

16) How are sessions tracked on PHP
With code rewriting using the PHP Session reference variable

17) Which function changes server parameters and status at runtime?
Memcache::setServerParams

18) Which function forces a write of all buffered output to the resource pointed to by the file handle?
fflush

19) Single-line comments in PHP use the following:
//

20) The ability of a class to protect access to its internal member variables is called:
encapsulation

21) You can use what function in order to check if a constant is set?
defined();

22) Which of these will perform integer rather than floating point division?
intval(x/y);

23) ______________ is a mechanism for storing data in the remote browser and thus tracking or identifying return users.
Cookies

24) Using the Zip Archive Class, which of the following will include a file to a ZIP archive from a given path?
zipArchive::addFile

25) Which of the following is an example of predefined cURL constant?
All of these

CURLAUTH_ANYSAFE
CURLFTPSSL_NONE
CURLOPT_FILE
CURLOPT_VERBOSE

26) Which of the following refers to a set of functions that allows you have access to multiple supported databases without writing your own wrapper functions?
PHP DBX

27) Which of the following is the correct syntax to retrieve an object from the memcache module?
$result = $memcache->get(‘key’);

28) _____________ attempts to establish an FTP connection to a remote server by emulating an FTP client.
FTP ftp_connect()

29) Which of the following will open the file “time.txt” as readable?
fopen(“time.txt”,”r”);

30) Which character must be set in the $mode argument for fopen($file, $mode) to open a file for reading and writing?
r+;

31) Which of the following is the correct way to implement a “for” control structure?
for($i=0; $i<10; $i++){ // do something }

32) Which of the following is the only keyword that can be written before the namespace at the top of the file?
declare

33) What is the correct way to access the property of a PHP object?
$obj->property

34) Select the convention sign used to indicate private variables and functions:
_ for $_name35) Arrays can be sorted with which of the following functions?
arsort(), ksort() and uksort();

36) Private members are accessible to:
The class itself and the classes that inherit from it

37) Which function returns the square root of its argument, with number of decimal places set by the optional scale factor?
bcsqrt()

38) What 2 types of parsers are used in PHP?

39) What does MIME stand for?
Multipurpose Internet Mail Extensions

40) Which configuration directive defines a comma separated list of server urls to use for session storage?
session.save_path

41) Which function gets permissions for the given file?
fileperms

42) Which function checks whether a file or directory exists?
file_exists

43) PHP constants:
All of these

Do not have a dollar sign ($) before them.
May be defined and accessed anywhere without regard to variable scoping rules
May not be redefined or undefined once they have been set.
May only evaluate to scalar values.

44) Which PHP operator type allows evaluation and manipulation of specific bits within an integer?
Bitwise operators45) At compile time static values are bound with
a name

46) Which Perl Compatible Regex character will cause any special character to be treated as a simple matching character?
\

47) Session files should not be stored on a directory viewable from the Web server because:
Malicious users may access other users’ login details

48) Which API reads in an XML file and creates a “walkable” object tree in memory, so it can be used in large documents?
DOM

49) What APIs are used for handling XML documents?
Document Object Model (DOM) and Simple API for XML (SAX)

50) ________________ tests for the end of file on a file pointer.
feof()51) Include files must have the file extension:
none of these

52) What is the term for using a class to create an object?
Instantiation

53) PHP constants:
All of these apply

Can be accessed anywhere in the script regardless of the scope.
Can be used as default argument values.
Cannot change during the execution of the script.
Follow the same rules as labels in PHP.54) Which statement can replace several else Statements?
switch

55) To retrieve information from a form that is submitted using the “get” method, use ___________.
$_GET[];

56) Which POSIX function takes the following two string arguments and an optional third-array argument: A POSIX-style regular expression pattern, and the target string to be matched?
ereg()

57) Which PHP operator will attempt to execute its contents as a shell command?
(` `)

58) What function takes any number of numerical arguments and returns the largest of the arguments?
max()

59) To unregister a session variable STRING use:
session_unregister(STRING);

60) Which of the following is correct to select a database in MS SQL?
mssql_select_db(STRING)

61) Select the variable used to set the php.ini file to send emails containing the address of the default PHP mail sender.
sendmail_from

62) Which configuration directive is used to transparently failover to other servers on errors?
memcache.allow_failover

63) Which PHP function is identical to the C fwrite() function?
fputs()

64) Which function writes a string to a file?
file_put_contents

65) To denote strings in PHP, you can use both double quotes ” ” and which other characters?
single quotes ‘ ‘

66) What kind of elements can be contained in constants?
All of these
Boolean
Float
String
integer67) Which PHP operator type allows you to execute its contents as a shell command?
Execution operator

68) PHP variables start with the following symbol:
$

69) Which POSIX function takes a pattern, a target string, and an optional limit on the number of portions to split the string into.
split

70) What function raises the first argument to the power of the second argument, with decimal places to be specified by the scale factor?
bcpow

71) Instead of a single new line character some clients require which characters?
“\r\n”

72) Which function parses input from a file according to a format?
fscanf

73) Which file should be edited to set configuration directives?
php.ini

74) Which of the following is correct in PHP?
Zero is interpreted as false

75) Which parameter of setcookie() defines the amount of time for which a cookie is valid?
expire

76) Which control structure allows you to quickly traverse through an array?
foreach loops

77) Which types of code can be affected by namespaces?
Classes, functions and constants.

Although any valid PHP code can be contained within a namespace, only four types of code are affected by namespaces: classes, interfaces, functions and constants.

78) Which cURL function returns the last error number?
curl_errno

79) Which of the following is an invalid constant name?
2DAY

80) Which PHP operator allows you to assign values to variables and arrays?
“=”

81) What is the term for breaking the binding between a variable name and variable content?
Unsetting references.82) Which is the operator for the integer remainder from the division of two values?
%

83) Which predefined Memcache function turns on data compression?
MEMCACHE_COMPRESSED

84) Which compressed file type can be decompressed without specifying the extension?
zip

85) Which configuration directive, in conjunction with memcache.allow_failover, defines how many servers to try when setting and getting data?
memcache.max_failover_attempts

86) The correct way to create a numeric variable “v” that might have any real number is:
$v;

87) Which of the following databases are supported by PHP?
All of these

MySQL abd MS SQL
Oracle and Informix
PostgreSQL and Frontbase
mSQL and Interbase88) Which of the following is the line to enable in the php.ini file for Windows in order to be able to use DBX?
extension=php_dbx.dll

89) Which of the following is the correct way to connect to a mySQL Server?
mysql_connect(SERVER, USER, PASSWORD);

90) Which of the following will return variables from a form sent by the HTTP POST method in PHP?
$_POST

91) Which version of PHP introduced object oriented programming?
PHP III

92) Which of the following will correctly create a constant “const”?
const const;

93) What variable is used by session cookies as a user ID?
$PHPSESSID

94) Functions that represent a behavior of a class are called _________.
Methods

95) Which zip function retrieves the compressed size of a directory entry?
zip_entry_compressedsize

96) What does cURL stand for?
Client URL

97) Which function clears the cache of file status info?
clearstatcache

98) Which method defines HTTP Authentication using Apache Server?
.htaccess files

99) What is the most widely accepted meaning of the acronym “PHP” today?
PHP: Hypertext Preprocessor

100) _______________ defines a cookie to be sent along with the rest of the HTTP headers.
setcookie()

101) The file handle argument in fread() allows you to specify ___________.
the number of bytes you wish to read

102) $count = $count + 8; can be written as:
$count += 8;

103) Which of the following is a special PHP variable that is used under HTTP Authentication?
$_PHP_AUTH_USER

104) XML is used for:
All of these
Data manipulation and storage
Display formatted data in a browser using style sheets.
transfer data between organizations
transfer data between software applications

105) Which kind of reference action allows you to have two variables referring to the same content?
Assign by reference.

106) ____________ describes the structure of a class of XML documents, specifying how elements are related and allowed.
Document Type Definition

107) Which parameter of setcookie() indicates that the cookie should only be transmitted over a secure HTTPS connection from the client?
secure

108) Which of the following can be included in a phar file?
All of these

a manifest describing the contents
a signature for verifying integrity
a stub
the file contents

109) Which of the following will encrypt a password?
crypt($password);110) Which of the following will connect to a data base using PEAR?
DB::connect(data_source_name);

111) Which of the following will return 1 if the Memcache session handler is available and 0 if not?
MEMCACHE_HAVE_SESSION

112) Which bz library function returns bzip2 encoded data after compressing a given string?
bzcompress()

113) Which function opens a memcached server persistent connection?
Memcache::pconnect

114) On the additional header that PHP allows you to include on an email you can add:
All of these

Content-transfer-encoding
Content-type
MIME version
X-mailer and version number115) __________ is the same as setcookie() but the cookie value will not be automatically urlencoded when sent to the browser.
setrawcookie()

116) Which function enables automatic compression of large values?
Memcache::setCompressThreshold

117) Which of the following will send queries to a database using PEAR?
none of these

$dbconn=query(QUERY)
$dbconn=query->(QUERY)
DB::query(QUERY)
DB::query->(QUERY)

118) Which PHP library allows you to connect to and communicate with different types of servers using many different types of protocol?
cURL

119) Which configuration directive sets the size of data chunks for transfers?
memcache.chunk_size

120) What does PEAR stand for?
PHP Extension and Application Repository

121) Which of the following functions are used to encrypt passwords?
md5() and crypt()

122) Which cURL function sets an option on the given cURL session handle?
curl_setopt

123) Which of the following are examples of resource types in cURL?
cURL handle and a cURL multi handle

124) Which API treats XML as flow-through string data?
CAX

125) What does XML mean?
eXtensible Markup Language

126) singleton design pattern
Sometimes it’s important to have only one instance for a class. For example, in a system there should be only one window manager (or only a file system or only a print spooler). Usually singletons are used for centralized management of internal or external resources and they provide a global point of access to themselves.

127) PHP magic constant
__LINE__

128) When a small window pops up in front of the browser asking your username and a password, what kind of Authentication is being used?
HTTP129) In session management cookies are usually not used for:
logging the user in for the first time

130) Which function returns the version of the server?
Memcache::getVersion

131) Which character must be set in the $mode argument for fopen($file, $mode) to open a file for reading and writing?
r+;

132) Which of the following will open the file “time.txt” as readable?
fopen(“time.txt”,”r”);

133) _____________ attempts to establish an FTP connection to a remote server by emulating an FTP client.
FTP ftp_connect()

134) Which of the following is the correct syntax to retrieve an object from the memcache module?
$result = $memcache->get(‘key’);

135) Which of these will perform integer rather than floating point division?
intval(x/y)

136) $count = $count * 3; can be written as:
$count *= 3;

137) What is the correct way to add 1 to the $counter variable?
$counter++;

138) Which operator appends the argument on the right side to the argument on the left side?
.=

139) With the ________ bitwise operator, the bits set in $a are not set, and the not set bits are then set.
~

140) Which bitwise operator will set the bits that are set in either $a or $b.
” | ”

141) Which of the following allows you to set a user-defined exception handler function?
set_exception_handler

142) In an object method, which of the following is always a reference to the caller object?
$this

143) Which kind of reference is used by creating a local variable in a function and a variable in the calling scope referencing the same content?
Assign by reference.

144) Which of the following returns the remainder of $a divided by $b?
$a % $b145) What PHP operator is used to access methods and properties of objects?
” -> ”

146) Which interface type allows you to chain methods of an object together?
Fluent Interfaces

147) Interfaces define a “contract” specifying that an object is capable of implementing a method ____________.
Specifying exactly how is to be done.

148) What is the correct way to create a function in PHP?
function yourFunction()

149) Which of the following will print “Hi ” followed a name argument passed to the function?
function sayHi ($name){ print “Hi $name”; }

150) A special method to perform any activity required to instantiate an object is called a(n) __________.
Constructor

151) Which POSIX character matches zero or more instances of the previous regular expression?
*

152) Which POSIX character matches any character?
.

153) If an exception is not caught, a PHP Fatal Error will be issued with what message?
“Uncaught Exception …”

154) Which statement retrieves the value of a function after it is called?
return

155) Which “magic” constant implemented inside an include, returns the directory of the included file.
_DIR_

156) Which function returns a string containing a byte-stream representation of any value that can be stored in PHP?
serialize()

157) How do you write “Hello World 2010″ in PHP?
echo “Hello World 2010″;

158) Which command returns the filename component of a path?
string basename ( string $path [, string $suffix ] )

159) Which file mode will read and write to the end of an existing file or create a new file?
“a+”

160) Which server verifies the name password and mail spool location?
SMTP Server

161) What does MTA stand for?
Mail Transfer Agent

162) The agent used to collect and access the mail spool is called:
Mail Transfer Agent – not sure163) __________ is an extension that provides a way to put entire PHP applications into a single file called PHP Archive for easy distribution and installation.
phar

164) Which function is used to connect to a database using Authentication by SQL Database Query?
@mysql_connect(“localhost”,”databaseuser”,”password”)

165) Which function takes a single argument and returns the largest integer that is less or equal to that argument?
floor()

166) Which function takes a single argument and returns the smallest integer that is greater than or equal to that argument?
ceil()

167) What is the expression for returning the square root of 2?
sqrt(2)

168) Which Perl Compatible Regex function takes a regex pattern and an array and returns an array of the elements of the input array that matched the pattern?
preg_grep

169) Protected members are available to:
The class itself and the classes that inherit from it

170) Which of these variables has an illegal name?
$your-Var

171) A(n) _____________ is an ordered map that assigns values to keys:
array

172) What PHP type represents a series of characters?
string

173) Which of the following is NOT a correct way to specify a string?
alfanum syntax

Strings in PHP can be specified in four different ways: single quoted, double quoted, heredoc syntax and (since PHP 5.3.0) nowdoc syntax

174) Which of the following allows you to express any real number?
double

175) Which of the following is the correct way to create a reference to a global variable?
$var =& $GLOBALS[“var”];

176) Which of the following provides a means to access the same content on PHP variables by different names?
References

177) Which PHP operator is used to concatenate strings?
“.”

178) What PHP token that allows access to static, constant, and overridden properties or methods of a class?
::

179) Which PHP operator type returns the result of string arguments?)
String operators

180) Which of these restrictions applies to namespace implementation?
Nested namespaces are prohibited.

181) What term applies to an identifier with a namespace separator that begins with a namespace separator, such as \Foo\Bar?
Fully qualified name.

182) Which of the following objects lets you create code which specifies which methods a class must implement, without specifying how the objects are handled?
Interfaces

183) Which Interface allows you to use a design pattern that is characteristically changed with the instantiation of objects?
Instantation Design Interface

184) Which POSIX character matches the beginning of a string only?
^

185) Which of the following are two broad classes of regular expressions that PHP works with?
POSIX and PHP-compatible regex

186) Which statement allows you to end a loop?
break

187) This “magic” constant refers to the name of the current namespace and it is defined in compile-time
_NAMESPACE_

188) What is the name for instances of a class that contain all the internal data and state information need for the application to run
Objects

189) ___________ allows a class to be defined as being a member of more than one category of classes
Polymorphism

190) The ability to define a class of one kind as being a subtype of a different kind of class is called:
Inheritance

191) Instantiate an object Demo: require_once(‘class.Demo.php’);
$objDemo = new Demo();

192) Which of the following is correct for adding a comment in a PHP script?
/* comment */

193) Which function returns (and caches) file permissions level?
fileperms(file)

194) Which PHP function sets file modification time or creates a file if it does not exist?
touch(file, [time])

195) Which of these PHP file open modes are valid for the specified conditions?
All of these

196) The ____________ function can be used in combination with the PHP header() construct to assemble and send file downloads.
fpassthru

197) Which function returns (and caches) the time a file was last accessed?
fileatime(file)

198) How do you modify the php.ini file to have sessions work correctly on windows?
change session.save_path = /tmp to session.save_path=C:/temp

199) Which function gets statistics from all servers in a pool?
Memcache::getExtendedStats

200) Which of the following functions returns a Boolean value after attempting to send a message?
mail()

201) Which of the following is the correct way to connect to a MySQL database?
mysql_connect(“localhost”);

202) Which files should be used to install cURL in an include directory?
easy.h and curl.h files

203) Which function returns the largest number that may be returned by rand()?
getrandmax()

PHP Level 1 Exam Sample Question/Answers for Freelancers

PHP Level 1 Exam

1. What is the correct way to add 1 to the $counter variable?

Answer: $counter++;

2. What function raises the first argument to the power of the second argument, with decimal places to be specified by the scale factor?

Answer: bcpow();

Example:
<?php echo bcpow(‘4.2′, ‘3’, 2); // 74.08 ?>

3. Which operator performs the same function as x=x%y?
Answer: %=

Example
<?php

$x = 9;
$y = 4;

echo $x%$y;  // output is: 1

echo $x %= $y; // output is: 1

?>

4. Which file mode will read and write to the end of an existing file or create a new file?
Answer: w+

Basic file modes

r Read only. Starts at the beginning of the file
r+ Read/Write. Starts at the beginning of the file
w Write only. Opens and clears the contents of file; or creates a new file if it doesn’t exist
w+ Read/Write. Opens and clears the contents of file; or creates a new file if it doesn’t exist
a Append. Opens and writes to the end of the file or creates a new file if it doesn’t exist
a+ Read/Append. Preserves file content by writing to the end of the file
x Write only. Creates a new file. Returns FALSE and an error if file already exists
x+ Read/Write. Creates a new file. Returns FALSE and an error if file already exists

5. Which of the following is correct for adding a comment in a PHP script?
Answer: /* comment */

Type of comments in PHP
//   or  #   single line comment
/* */            multi line  comment


6. Which function returns (and caches) the owner ID number?
Answer: fileowner()

7. Which of the following is the correct way to implement a do-while loop?
Answer:
$j = 0;
do { print “$j”; }
while ($j > 0);

8. Which statement will skip the rest of the current loop iteration and continue execution at the beginning of next iteration.

Answer: continue

9. Which of the following is correct to show a message for an exception?
Answer: throw new Exception (“Invalid data”);

Example
<?php

function inverse($x) {
if (!$x) {
throw new Exception(‘Division by zero.’);
}
return 1/$x;
}
?>

10. What term refers to the ability to shorten Extra_Long_Names improving readability of source code? 
Answer: Aliasing

11. What PHP function returns the arctangent in radians of a numerical argument?
Answer: atan()

12.Which function is used to start tracking a user?
Answer: session_start()

13. What statement will delete session files?
Answer: session_destroy()

14. How are sessions tracked on PHP
Answer: with code rewriting using the PHP Session reference variable

15. The file handle argument in fread() allows you to specify ___________.
Answer: the number of bytes you wish to read