3v4l.org

run code in 300+ PHP versions simultaneously
<?php function get_field($field, $post_id, $format = true) { return [ 'project_manager' => [33, 9, 21], 'architect' => [], 'contractor' => [17, 16] ][$field]; } function update_field($field, $payload, $post_id, $format = true) { var_export($payload); } function my_acf_save_post_31($post_id) { update_field( 'project_user_select', array_filter([ ...get_field('project_manager', $post_id, false), ...get_field('architect', $post_id, false), ...get_field('contractor', $post_id, false) ]), $post_id ); } my_acf_save_post_31(1);
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => 33, 1 => 9, 2 => 21, 3 => 17, 4 => 16, )

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:
27.06 ms | 405 KiB | 5 Q