TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

My attempt on functional programming in PHP

10 点作者 hacksilver超过 4 年前

1 comment

adlpz超过 4 年前
This article is very outdated. PHP has closures, can natively pass callables as arguments and you don&#x27;t need any of these workarounds:<p><a href="https:&#x2F;&#x2F;www.php.net&#x2F;manual&#x2F;en&#x2F;functions.anonymous.php" rel="nofollow">https:&#x2F;&#x2F;www.php.net&#x2F;manual&#x2F;en&#x2F;functions.anonymous.php</a><p>It&#x27;s not <i>idiomatic</i> to do so, but you can totally write sort of functional PHP nowadays without any tricks. Stuff like `array_map` exists since PHP 4.
评论 #26208926 未加载