ackintosh / toumi
包含旧代码的库。
1.1
2017-09-27 04:08 UTC
Requires
- php: >=5.3.0
Requires (Dev)
- phpunit/phpunit: ~5.0
This package is auto-updated.
Last update: 2024-09-16 09:20:54 UTC
README
用于包含旧版php文件的库。
用法
legacy.php
<?php function hoge($arg) { return 'hoge' . $arg; } somefunction(1234); function fuga() { $f = function () { echo 'fuga'; }; call_user_func($f); } var_dump(hoge('hogehoge')); exit;
<?php // Only function declaration is included. \Ackintosh\Toumi::load('legacy.php'); class LegacyTest extends PHPUnit_Framework_TestCase { /** * @test */ public function hoge() { $this->assertSame('hogefuga', hoge('fuga')); } }
作者
Akihito Nakano