xref: /PHP-5.4/ext/mbstring/tests/simpletest.phpt (revision 408e019b)
1--TEST--
2Simple multi-byte print test (EUC-JP)
3--SKIPIF--
4<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
5--INI--
6output_handler=
7--FILE--
8<?php
9/*
10 * Test basic PHP functions to check if it works with multi-byte chars
11 */
12
13// EUC-JP strings
14$s1 = "�ޥ���Х��ȴؿ����Ȥ��ޤ���";
15$s2 = "����ʸ����Ϣ�뤵��Ƥ���Ϥ���";
16
17// print directly
18echo "echo: ".$s1.$s2."\n";
19print("print: ".$s1.$s2."\n");
20printf("printf: %s%s\n",$s1, $s2);
21echo sprintf("sprintf: %s%s\n",$s1, $s2);
22
23// Assign to var
24$s3 = $s1.$s2."\n";
25echo "echo: ".$s3;
26
27?>
28--EXPECT--
29echo: �ޥ���Х��ȴؿ����Ȥ��ޤ�������ʸ����Ϣ�뤵��Ƥ���Ϥ���
30print: �ޥ���Х��ȴؿ����Ȥ��ޤ�������ʸ����Ϣ�뤵��Ƥ���Ϥ���
31printf: �ޥ���Х��ȴؿ����Ȥ��ޤ�������ʸ����Ϣ�뤵��Ƥ���Ϥ���
32sprintf: �ޥ���Х��ȴؿ����Ȥ��ޤ�������ʸ����Ϣ�뤵��Ƥ���Ϥ���
33echo: �ޥ���Х��ȴؿ����Ȥ��ޤ�������ʸ����Ϣ�뤵��Ƥ���Ϥ���
34
35