2 Check for bbcode functions
4 <?php if (!extension_loaded("bbcode")) print "skip"; ?>
12 'type' => BBCODE::TYPE_ROOT,
13 'child' => ['ul','url','img','b','i']
16 'type' => BBCODE::TYPE_MULTI
17 //TODO: by default open tag = <KEY> and close tag = </KEY>
20 'type' => BBCODE::TYPE_MULTI
23 'type' => BBCODE::TYPE_MULTI,
27 'type' => BBCODE::TYPE_MULTI,
29 'child' => ['url','img','b','i']
32 'type' => BBCODE::TYPE_MULTI,
33 'parent' => ['','li','b','i'],
40 ':)' => '<img src="smiley.gif" alt=":)" />',
41 ':(' => '<img src="sad.gif" alt=":(" />',
42 ':D' => '<img src="happy.gif" alt=":D" />',
43 ':p' => '<img src="tong.gif" alt=":p" />',
44 ':|' => '<img src="special.gif" alt=":|" />',
45 ':6:' => '<img src="six.gif" alt=":6:" />'
49 echo $obj->parse('[ul][li][url=https://rapsys.eu]Rapsys[/url][/li][li][url=https://google.fr]Google[/url][/li][/ul]');
51 you can add regression tests for your extension here
53 the output of your test code has to be equal to the
54 text in the --EXPECT-- section below for the tests
55 to pass, differences between the output and the
56 expected text are interpreted as failure
58 see php7/README.TESTING for further information on
59 writing regression tests
63 [ul][li][url=https://rapsys.eu]Rapsys[/url][/li][li][url=https://google.fr]Google[/url][/li][/ul]