Answer the question
In order to leave comments, you need to log in
HipHop PHP not seeing file errors?
For a long time I have been trying to figure out the causes of the problem. The search turned up no results, except for a couple of good musical compositions.
Ubuntu 12.04 system.
The situation is as follows: I downloaded and built from HipHop PHP sources using this instruction: github.com/facebook/hiphop-php/wiki/Building-and-i...
Everything was set up and assembled perfectly.
After that, I launched a static code analysis using this article: habrahabr.ru/post/145683/
The analyzer started up, worked, created the necessary files - but it does not see any errors, no matter what code I analyze.
In order to understand the problem, I specifically created the “errors.php” file:
<?php
// на случай если error_reporting в PHP влияет на работу hiphop
error_reporting(E_ALL);
// Обращение к необъявленной переменной
$a = $b;
// ошибочный порядок необязательных аргументов
function test($x=false, $y)
{
// Обращение к локальной необъявленной переменной
return $value;
}
// Вызов функции с неправильным количеством параметров
test();
// обращение к несуществующей функции
test_bad_function();
// попытка вывести необъявленную переменную
echo $undefined_variable;
?>
$HPHP_HOME/src/hphp/hphp /home/frost/errors.php --output-dir=$OUTPUT_DIR --log=4 --force=1 --keep-tempdir=1 --target=analyze
running hphp...
Analyzing Includes
Analyzing All
Corrected function return type Boolean -> Variant
Corrected function return type [0x1] -> Variant
Corrected function return type [0x1] -> Object - iterator
Analyzing Includes
Analyzing All
Analyzing Includes
Analyzing All
parsing inputs...
parsing /home/frost/errors.php ...
Analyzing Includes
Analyzing All
parsing inputs took 0'00" (5 ms) wall time
pre-optimizing...
pre-optimizing took 0'00" (4 ms) wall time
analyze includes...
analyze includes took 0'00" (0 ms) wall time
inferring types...
inferring types took 0'00" (3 ms) wall time
post-optimizing...
post-optimizing took 0'00" (7 ms) wall time
saving code errors and stats...
saving stats...
saving stats took 0'00" (9 ms) wall time
all files saved in /home/frost/hiphop/reports ...
running hphp took 0'00" (195 ms) wall time
{
"FileCount":1,
"LineCount":19,
"CharCount":546,
"FunctionCount":2,
"ClassCount":0,
"TotalTime":0,
"AvgCharPerLine":28,
"AvgLinePerFunc":9,
"SymbolTypes":
{
"Array":20,
"Boolean":8,
"Double":19,
"Int64":2248,
"Object":3,
"Object - Specific":20,
"Primitive":13,
"String":134,
"Variant":306,
"_all":2771,
"_strong":2452,
"_weak":319
}
,"VariableTableFunctions":[]
}
[0,{}
]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question