@@ -4752,8 +4752,7 @@ PHP_FUNCTION(array_pad)
47524752
47534753 if (input_size >= pad_size_abs ) {
47544754 /* Copy the original array */
4755- ZVAL_COPY (return_value , input );
4756- return ;
4755+ RETURN_COPY (input );
47574756 }
47584757
47594758 num_pads = pad_size_abs - input_size ;
@@ -4915,8 +4914,7 @@ PHP_FUNCTION(array_unique)
49154914 ZEND_PARSE_PARAMETERS_END ();
49164915
49174916 if (Z_ARRVAL_P (array )-> nNumOfElements <= 1 ) { /* nothing to do */
4918- ZVAL_COPY (return_value , array );
4919- return ;
4917+ RETURN_COPY (array );
49204918 }
49214919
49224920 if (sort_type == PHP_SORT_STRING ) {
@@ -6503,8 +6501,7 @@ PHP_FUNCTION(array_filter)
65036501 ZEND_PARSE_PARAMETERS_END ();
65046502
65056503 if (zend_hash_num_elements (Z_ARRVAL_P (array )) == 0 ) {
6506- RETVAL_EMPTY_ARRAY ();
6507- return ;
6504+ RETURN_EMPTY_ARRAY ();
65086505 }
65096506 array_init (return_value );
65106507
@@ -6757,8 +6754,7 @@ PHP_FUNCTION(array_map)
67576754
67586755 /* Short-circuit: if no callback and only one array, just return it. */
67596756 if (!ZEND_FCI_INITIALIZED (fci ) || !maxlen ) {
6760- ZVAL_COPY (return_value , & arrays [0 ]);
6761- return ;
6757+ RETURN_COPY (& arrays [0 ]);
67626758 }
67636759
67646760 array_init_size (return_value , maxlen );
@@ -6976,8 +6972,7 @@ PHP_FUNCTION(array_chunk)
69766972
69776973 if (size > num_in ) {
69786974 if (num_in == 0 ) {
6979- RETVAL_EMPTY_ARRAY ();
6980- return ;
6975+ RETURN_EMPTY_ARRAY ();
69816976 }
69826977 size = num_in ;
69836978 }
0 commit comments