3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( 0 => array( 'univs_id' => 1001, 'univs_name' => '清华大学', 'province_id' => 110000, 'province' => '北京', ), 1 => array( 'univs_id' => 1002, 'univs_name' => '北京大学', 'province_id' => 110000, 'province' => '北京', ), 2 => array( 'univs_id' => 1003, 'univs_name' => '中国人民大学', 'province_id' => 110000, 'province' => '北京', ), ); $res = array_map(function($v){ return [$v['univs_id']=>$v]; });var_dump($res);
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught ArgumentCountError: array_map() expects at least 2 arguments, 1 given in /in/DmkJB:24 Stack trace: #0 /in/DmkJB(24): array_map(Object(Closure)) #1 {main} thrown in /in/DmkJB on line 24
Process exited with code 255.

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:
57.46 ms | 401 KiB | 8 Q