3v4l.org

run code in 200+ PHP versions simultaneously
<?php function func_get_args_in_current_user_can( $capability ) { $args = array_slice( func_get_args(), 1 ); $args = array_merge( array( $capability ), $args ); var_dump($args); } function func_get_args_simplified( $capability ) { $args = func_get_args(); var_dump($args); } // Passing 1 arg. func_get_args_in_current_user_can( 'edit_posts' ); func_get_args_simplified( 'edit_posts' ); // Passing 2 args. func_get_args_in_current_user_can( 'edit_post', 10 ); func_get_args_simplified( 'edit_post', 10 ); // Passing 3 args. func_get_args_in_current_user_can( 'edit_post_meta', 10, 'meta_key' ); func_get_args_simplified( 'edit_post_meta', 10, 'meta_key' );

Shows result from various feature-branches currently under review from the php developers. Contact me to have additional branches featured.

Output for branch php-master
array(1) { [0]=> string(10) "edit_posts" } array(1) { [0]=> string(10) "edit_posts" } array(2) { [0]=> string(9) "edit_post" [1]=> int(10) } array(2) { [0]=> string(9) "edit_post" [1]=> int(10) } array(3) { [0]=> string(14) "edit_post_meta" [1]=> int(10) [2]=> string(8) "meta_key" } array(3) { [0]=> string(14) "edit_post_meta" [1]=> int(10) [2]=> string(8) "meta_key" }
Output for branch php-master+opcache
array(1) { [0]=> string(10) "edit_posts" } array(1) { [0]=> string(10) "edit_posts" } array(2) { [0]=> string(9) "edit_post" [1]=> int(10) } array(2) { [0]=> string(9) "edit_post" [1]=> int(10) } array(3) { [0]=> string(14) "edit_post_meta" [1]=> int(10) [2]=> string(8) "meta_key" } array(3) { [0]=> string(14) "edit_post_meta" [1]=> int(10) [2]=> string(8) "meta_key" }
Output for branch php-master+jit
array(1) { [0]=> string(10) "edit_posts" } array(1) { [0]=> string(10) "edit_posts" } array(2) { [0]=> string(9) "edit_post" [1]=> int(10) } array(2) { [0]=> string(9) "edit_post" [1]=> int(10) } array(3) { [0]=> string(14) "edit_post_meta" [1]=> int(10) [2]=> string(8) "meta_key" } array(3) { [0]=> string(14) "edit_post_meta" [1]=> int(10) [2]=> string(8) "meta_key" }

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