Annotation of embedaddon/php/Zend/tests/nowdoc_015.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Test nowdoc and line numbering
                      3: --FILE--
                      4: <?php
                      5: function error_handler($num, $msg, $file, $line, $vars) {
                      6:        echo $line,"\n";
                      7: }
                      8: set_error_handler('error_handler');
                      9: trigger_error("line", E_USER_ERROR);
                     10: $x = <<<EOF
                     11: EOF;
                     12: var_dump($x);
                     13: trigger_error("line", E_USER_ERROR);
                     14: $x = <<<'EOF'
                     15: EOF;
                     16: var_dump($x);
                     17: trigger_error("line", E_USER_ERROR);
                     18: $x = <<<EOF
                     19: test
                     20: EOF;
                     21: var_dump($x);
                     22: trigger_error("line", E_USER_ERROR);
                     23: $x = <<<'EOF'
                     24: test
                     25: EOF;
                     26: var_dump($x);
                     27: trigger_error("line", E_USER_ERROR);
                     28: $x = <<<EOF
                     29: test1
                     30: test2
                     31: 
                     32: test3
                     33: 
                     34: 
                     35: EOF;
                     36: var_dump($x);
                     37: trigger_error("line", E_USER_ERROR);
                     38: $x = <<<'EOF'
                     39: test1
                     40: test2
                     41: 
                     42: test3
                     43: 
                     44: 
                     45: EOF;
                     46: var_dump($x);
                     47: trigger_error("line", E_USER_ERROR);
                     48: echo "ok\n";
                     49: ?>
                     50: --EXPECT--
                     51: 6
                     52: string(0) ""
                     53: 10
                     54: string(0) ""
                     55: 14
                     56: string(4) "test"
                     57: 19
                     58: string(4) "test"
                     59: 24
                     60: string(20) "test1
                     61: test2
                     62: 
                     63: test3
                     64: 
                     65: "
                     66: 34
                     67: string(20) "test1
                     68: test2
                     69: 
                     70: test3
                     71: 
                     72: "
                     73: 44
                     74: ok

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>