草庐IT

PHP 内部 : How does TSRMLS_FETCH Work?

PHPInternalsTSRMLS_FETCH宏是如何工作的?根据PHPManualWhiledevelopingextensions,builderrorsthatcontain"tsrm_lsisundefined"orerrorstothateffectstemfromthefactthatTSRMLSisundefinedinthecurrentscope,tofixthis,declarethefunctiontoacceptTSRMLSwiththeappropriatemacro,iftheprototypeofthefunctioninquestioncannotbe

php - 使 print_r 使用 PHP_EOL

我的PHP_EOL是“\r\n”,但是,当我在数组上执行print_r时,每个新行都有一个“\n”-而不是“\r\n”-放在后面知道是否可以改变这种行为吗? 最佳答案 如果您查看print_r的源代码,您会发现:PHP_FUNCTION(print_r){zval*var;zend_booldo_return=0;if(zend_parse_parameters(ZEND_NUM_ARGS()TSRMLS_CC,"z|b",&var,&do_return)==FAILURE){RETURN_FALSE;}if(do_return){