run code in 150+ php & hhvm versions
Bugs & Features
<?php /*Strings: (1)Are either contained in double or single quotation marks, (2)They are defined the same way that you would declare variables, $varible_name = "string_name" 'value of the string inside qoutes' (3)To print out the value of a string, use either echo() or print(): echo $first_name; (4)To print the value of string within a context, use double quotation marks: echo “Hello, $first_name”;*/ $my_name = 'Travis'; echo $my_name; print $my_name; echo 'Hello, $my_name'; ?>
Output for 4.3.0 - 5.6.25, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
TravisTravisHello, $my_name