A binary assignment in PHP returns a temporary variable, not the left-hand side — so sign($after_signed = $bin_str) passes a value, not a reference. This post analyses the opcodes and parser rules behind it.
with 0 CommentPHP variables come from two places: the code itself and the outside world (GET/POST/DB), and their lifetimes differ. This article traces the whole lifecycle of GET data, from php_request_startup and php_hash_environment through php_default_treat_data, php_strtok_r and php_register_variable_safe, showing how a query string is turned into the $_GET array.
with 0 CommentPATH_INFO is a CGI 1.1 standard, and it is often used as a carrier for passing parameters.
In Apache, with no configuration at all, AcceptPathInfo is accepted by default for PHP scripts, which means:
if the server has a /laruence/info.php
then for the following requests, Apache accepts them all:
/laruence/info.php/dummy /laruence/info.php/pathinfo
Under Nginx, by default Nginx does not support PATH INFO, meaning those requests will 404 with a file-not-found error.
with 0 CommentHow the Zend Engine turns HTML outside PHP tags into T_INLINE_HTML tokens and ZEND_ECHO opcodes (split into 400-character chunks), and how the '@' error suppression operator is compiled into two oplines that swap error_reporting(0) in and out around the statement.
with 0 Comment