string { if ($name === null) return "name is null"; return "Hello " . $name; } function null_ng_arg_func(string $name) : string { return "Hello " . $name; } nullable_arg_func(null); null_ng_arg_func(null); // エラー発生 実行結果 $ hhvm examples.php Fatal error: Argument 1 passed to null_ng_arg_func() must be an instance of string, null given in /home/yone098/examples.php on line 10
return "Hello, BpStudy#81"; } bad_func(); 実行結果 $ hh_client /home/yone098/bad.php:3:10,28: Invalid return type /home/yone098/bad.php:2:23,25: This is an int /home/yone098/bad.php:3:10,28: It is incompatible with a string プロジェクトのルー トフォルダに .hhconfig ファイルを設置 しチェックを行うのがベスト
19.53 [#/sec] (mean) Time per request: 2560.771 [ms] (mean) Time per request: 51.215 [ms] (mean, across all concurrent requests) Transfer rate: 154.85 [Kbytes/sec] received wordpress nginx + fastcgi + hhvm Requests per second: 42.97 [#/sec] (mean) Time per request: 1163.692 [ms] (mean) Time per request: 23.274 [ms] (mean, across all concurrent requests) Transfer rate: 340.33 [Kbytes/sec] received