You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am new to HipHop and I'm trying to get a custom PHP application to compile and run and the compilation error log file contains hundreds of errors relating to the $this variable being "Undeclared".. here is a simplified example:-
file bar.php:
class Bar {
private $_baz = 'Hello';
public function __construct() {
echo 'Constructed';
}
public function foo() {
echo $this->_baz;
}
}
$bah = new Bar();
$bah->foo();
this file is listed as the only entry in a list text file f.lst and the HipHop compiler is invoked...
root@hiphop:/home/rich/www# hhvm --hphp --input-list=f.lst -k 1 --log=3
running hphp...
creating temporary directory /tmp/hphp_rC6OVL ...
parsing inputs...
parsing inputs took 0'00" (3605 us) wall time
pre-optimizing...
pre-optimizing took 0'00" (1757 us) wall time
analyze includes...
analyze includes took 0'00" (4 us) wall time
inferring types...
inferring types took 0'00" (1503 us) wall time
post-optimizing...
post-optimizing took 0'00" (2870 us) wall time
creating binary HHBC files...
creating binary HHBC files took 0'00" (254854 us) wall time
saving code errors...
all files saved in /tmp/hphp_rC6OVL ...
running hphp took 0'00" (357323 us) wall time
the resulting JSON error log /tmp/hphp_rC60VL/CodeError.js - contains this:-
I am new to HipHop and I'm trying to get a custom PHP application to compile and run and the compilation error log file contains hundreds of errors relating to the $this variable being "Undeclared".. here is a simplified example:-
file bar.php:
class Bar {
private $_baz = 'Hello';
}
$bah = new Bar();
$bah->foo();
this file is listed as the only entry in a list text file f.lst and the HipHop compiler is invoked...
root@hiphop:/home/rich/www# hhvm --hphp --input-list=f.lst -k 1 --log=3
running hphp...
creating temporary directory /tmp/hphp_rC6OVL ...
parsing inputs...
parsing inputs took 0'00" (3605 us) wall time
pre-optimizing...
pre-optimizing took 0'00" (1757 us) wall time
analyze includes...
analyze includes took 0'00" (4 us) wall time
inferring types...
inferring types took 0'00" (1503 us) wall time
post-optimizing...
post-optimizing took 0'00" (2870 us) wall time
creating binary HHBC files...
creating binary HHBC files took 0'00" (254854 us) wall time
saving code errors...
all files saved in /tmp/hphp_rC6OVL ...
running hphp took 0'00" (357323 us) wall time
the resulting JSON error log /tmp/hphp_rC60VL/CodeError.js - contains this:-
[1,{"UseUndeclaredVariable":[{"c1":["bar.php",11,8,11,12]
,"d":"$this"}
]
}
]
Am I missing something obvious here?
TIA
The text was updated successfully, but these errors were encountered: