1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Rufina [12.5K]
3 years ago
8

What will be the output of the following code? <?php $foo = 'Bob'; $bar = $foo; $bar = "My name is $bar"; print $bar; print $

foo; ?>
a. Error
b. My name is BobBob
c. My name is BobMy name is Bob
d. My name is Bob Bob
Computers and Technology
2 answers:
SCORPION-xisa [38]3 years ago
7 0

Answer: b. My name is BobBob

Explanation:

  • $foo = 'Bob'; // Assigns foo variable the value Bob
  • $bar = $foo; // Assigns the value of foo to bar
  • $bar = "My name is $bar"; //changes the $bar this is the way to  include variables directly in the string.
  • print $bar; // this prints My name is and moves to the variable $bar which prints the value of $bar which is the value of $foo i.e. Bob
  • print $foo; // prints another Bob
Vera_Pavlovna [14]3 years ago
6 0

Answer:

c

Explanation:

error

You might be interested in
A ____ is a battery-operated power source directly attached to one or more devices and to a power supply (such as a wall outlet)
bagirrra123 [75]
Universal power supply
3 0
3 years ago
When a browser is open on your computer, what browser tool is used to move the webpage to the previously viewed page on the brow
ch4aika [34]

Answer:

back arrow button

Explanation:

7 0
3 years ago
Debug the program so it prints the factorial of a positive integer entered by the user. This is calculated by multiplying all th
Monica [59]

Your main problem was declaring int prod in the while loop. This caused prod to be reset back to 1 every time the while loop ran.

3 0
3 years ago
Many of the internal OS services are provided by the ___________ module, which contains the most important operating system proc
patriot [66]

Answer:

Kernal module

Explanation:

Modules are pieces of code that can be loaded and unloaded into the kernel upon demand. They extend the functionality of the kernel without the need to reboot the system.

6 0
4 years ago
Choose the correct term to complete the sentence.
Diano4ka-milaya [45]

Answer:

Object-oriented programming

Explanation:

When used in object-oriented programming , a class is a factory for creating object. An object is a collection of data and behavaiors that represent some entity(real or abstract).

6 0
3 years ago
Other questions:
  • If a method writes to a file it should start out like (fill out the blank, what should you write after the parameters in the met
    12·1 answer
  • An AM index between 0 and 1 indicates what? a. the AM signal is very small and will not be detected by the receiver b. distortio
    12·1 answer
  • Write a shell (text-based) program, called first_word.py, that opens the file stuff.txt and prints out the first word of every l
    14·1 answer
  • What is the purpose of a Primary Domain Controller?
    12·1 answer
  • What does the revolver do?
    10·1 answer
  • How many different textile items would you find at a festival? (please list 5 items)
    7·1 answer
  • When creating a storyboard, in which section do you mention how you move from one shot to the next?
    8·1 answer
  • Place a check next to each of the choices that describe an example of proper ergonomics. (more than 1 answer)
    7·2 answers
  • How does one of the algorithms in your program function?
    13·1 answer
  • What function would you use to calculate the total interest paid for the first year of a mortgage?.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!