????JFIF??x?x????'
Server IP : 79.136.114.73 / Your IP : 3.133.83.94 Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/self/root/home/b8009/php-5.6.22/ext/standard/tests/strings/ |
Upload File : |
--TEST-- Test print() function : basic functionality --FILE-- <?php /* Prototype : int print ( string $arg ) * Description: Output a string * Source code: n/a, print is a language construct not an extension function * Test based on php.net manual example. */ echo "*** Testing print() : basic functionality ***\n"; echo "\n-- Iteration 1 --\n"; print("Hello World"); echo "\n-- Iteration 2 --\n"; print "print() also works without parentheses."; echo "\n-- Iteration 3 --\n"; print "This spans multiple lines. The newlines will be output as well"; echo "\n-- Iteration 4 --\n"; print "This also spans\nmultiple lines. The newlines will be\noutput as well."; echo "\n-- Iteration 5 --\n"; print "escaping characters is done \"Like this\"."; // You can use variables inside of a print statement $foo = "foobar"; $bar = "barbaz"; echo "\n-- Iteration 6 --\n"; print "foo is $foo"; // foo is foobar // You can also use arrays $bar = array("value" => "foo"); echo "\n-- Iteration 7 --\n"; print "this is {$bar['value']} !"; // this is foo ! // Using single quotes will print the variable name, not the value echo "\n-- Iteration 8 --\n"; print 'foo is $foo'; // foo is $foo // If you are not using any other characters, you can just print variables echo "\n-- Iteration 9 --\n"; print $foo; // foobar echo "\n-- Iteration 10 --\n"; $variable = "VARIABLE"; print <<<END This uses the "here document" syntax to output multiple lines with $variable interpolation. Note that the here document terminator must appear on a line with just a semicolon no extra whitespace!\n END; ?> ===DONE=== --EXPECT-- *** Testing print() : basic functionality *** -- Iteration 1 -- Hello World -- Iteration 2 -- print() also works without parentheses. -- Iteration 3 -- This spans multiple lines. The newlines will be output as well -- Iteration 4 -- This also spans multiple lines. The newlines will be output as well. -- Iteration 5 -- escaping characters is done "Like this". -- Iteration 6 -- foo is foobar -- Iteration 7 -- this is foo ! -- Iteration 8 -- foo is $foo -- Iteration 9 -- foobar -- Iteration 10 -- This uses the "here document" syntax to output multiple lines with VARIABLE interpolation. Note that the here document terminator must appear on a line with just a semicolon no extra whitespace! ===DONE===