MCPcopy Create free account
hub / github.com/VKCOM/kphp / can_use_precomputed_hash_indexing_array

Function can_use_precomputed_hash_indexing_array

compiler/code-gen/vertex-compiler.cpp:443–460  ·  view source on GitHub ↗

* If array is indexed by a constant string like in $a['somekey'], we want to precompute * the string key hash at the compile time so we don't have to do it during the run time. * This method checks whether a key is a constant key and if it is, computes the hash. * @return int string_hash or 0 (if string hash itself is 0, this array access won't be optimized) */

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 6

compile_null_coalesceFunction · 0.85
compile_func_callFunction · 0.85
compile_xsetFunction · 0.85
compile_arrayFunction · 0.85
compile_set_valueFunction · 0.85

Calls 5

php_try_to_intFunction · 0.85
string_hashFunction · 0.50
typeMethod · 0.45
get_stringMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected