3v4l.org

run code in 300+ PHP versions simultaneously
<?php $datas = [ [ 'article_id' => 1, 'article_title' => ' Article 1', 'article_content' => 'This is some dummy text for the first article.', ], [ 'article_id' => 2, 'article_title' => 'Article 2', 'article_content' => 'This is the content for article #2', ] ]; $linkID = 2; $articles = array_column($datas, null, 'article_id'); if (isset($articles[$linkID])) { list('article_title'=> $title, 'article_content' => $content) = $articles[$linkID]; echo $title . \PHP_EOL; echo $content . \PHP_EOL; }
Output for git.master, git.master_jit, rfc.property-hooks
Article 2 This is the content for article #2

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
28.46 ms | 405 KiB | 5 Q