TypePHP 编译器
https://swoole.com/aot/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.9 KiB
43 lines
1.9 KiB
--TEST--
|
|
Test function show_source() by calling it with its expected arguments, more test for highlight_file()
|
|
--SKIPIF--
|
|
<?php
|
|
echo 'skip AOT limitation';
|
|
?>
|
|
--CREDITS--
|
|
Francesco Fullone ff@ideato.it
|
|
#PHPTestFest Cesena Italia on 2009-06-20
|
|
--FILE--
|
|
<?php
|
|
echo "*** Test by calling method or function with its expected arguments ***\n";
|
|
$foo = 'bar';
|
|
$baz = "something ".$foo."\n";
|
|
|
|
if ( $foo == 'bar' )
|
|
{
|
|
$baz = 'baz';
|
|
}
|
|
|
|
/* some code here */
|
|
|
|
show_source(__FILE__);
|
|
|
|
?>
|
|
--EXPECT--
|
|
*** Test by calling method or function with its expected arguments ***
|
|
<pre><code style="color: #000000"><span style="color: #0000BB"><?php
|
|
</span><span style="color: #007700">echo </span><span style="color: #DD0000">"*** Test by calling method or function with its expected arguments ***\n"</span><span style="color: #007700">;
|
|
</span><span style="color: #0000BB">$foo </span><span style="color: #007700">= </span><span style="color: #DD0000">'bar'</span><span style="color: #007700">;
|
|
</span><span style="color: #0000BB">$baz </span><span style="color: #007700">= </span><span style="color: #DD0000">"something "</span><span style="color: #007700">.</span><span style="color: #0000BB">$foo</span><span style="color: #007700">.</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;
|
|
|
|
if ( </span><span style="color: #0000BB">$foo </span><span style="color: #007700">== </span><span style="color: #DD0000">'bar' </span><span style="color: #007700">)
|
|
{
|
|
</span><span style="color: #0000BB">$baz </span><span style="color: #007700">= </span><span style="color: #DD0000">'baz'</span><span style="color: #007700">;
|
|
}
|
|
|
|
</span><span style="color: #FF8000">/* some code here */
|
|
|
|
</span><span style="color: #0000BB">show_source</span><span style="color: #007700">(</span><span style="color: #0000BB">__FILE__</span><span style="color: #007700">);
|
|
|
|
</span><span style="color: #0000BB">?>
|
|
</span></code></pre>
|
|
|