* Set EnableHipHopSyntax=true to enable string and integer type hints. I gave the file a .hphp extension to avoid false alarms in syntax checking scripts. * Made sure almost all the local variables in preprocessToObj() have a specific type, instead of being variants. This is useful for integers, but has the largest impact for objects, since dynamic method calls can be avoided. * Stopped using extract() since it forces all local variables to be variants, and adds some hashtable initialisation overhead. * Found a way to cast a variant to a specific object class, by abusing argument type hinting. The method does not require special syntax; it is harmless in Zend PHP. * Wrapped various internal function calls with type casts. strspn() and substr() need to be wrapped with intval() and strval() respectively, since they return a variant to support special error return values. HipHop isn't smart enough to know whether the error case will be triggered. * Replaced most instances of double-equals with triple-equals. Profiling indicates that this makes a very large difference when comparing strings, much more so than in Zend.
5 lines
123 B
Text
5 lines
123 B
Text
GenerateSourceInfo = true
|
|
EnableEval = 2
|
|
AllDynamic = true
|
|
EnableHipHopSyntax = true
|
|
EnableHipHopExperimentalSyntax = true
|