[ 
https://issues.apache.org/jira/browse/THRIFT-5984?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Volodymyr Panivko updated THRIFT-5984:
--------------------------------------
        Parent: THRIFT-5960
    Issue Type: Sub-task  (was: Improvement)

> Cache function_exists() capability checks in PHP runtime hot paths
> ------------------------------------------------------------------
>
>                 Key: THRIFT-5984
>                 URL: https://issues.apache.org/jira/browse/THRIFT-5984
>             Project: Thrift
>          Issue Type: Sub-task
>          Components: PHP - Library
>            Reporter: Volodymyr Panivko
>            Priority: Minor
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> In `lib/php/lib/Serializer/TBinarySerializer.php` and 
> `lib/php/lib/Transport/TSocket.php` the runtime calls `function_exists()` on 
> every serialize / deserialize / open() — checking for the same C-extension 
> and socket functions whose presence is a static property of the PHP 
> installation.
> Memoize these checks via `private static ?bool` flags initialized with the 
> null-coalescing assignment operator (`??=`). One-time lookup per process, 
> identical behavior.
> Follow-up to THRIFT-5981 / THRIFT-5983 under the umbrella THRIFT-5960 (PHP 
> modernization).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to