@@ -4753,8 +4753,7 @@ PHP_FUNCTION(array_pad)
47534753
47544754 if (input_size >= pad_size_abs ) {
47554755 /* Copy the original array */
4756- ZVAL_COPY (return_value , input );
4757- return ;
4756+ RETURN_COPY (input );
47584757 }
47594758
47604759 num_pads = pad_size_abs - input_size ;
@@ -4916,8 +4915,7 @@ PHP_FUNCTION(array_unique)
49164915 ZEND_PARSE_PARAMETERS_END ();
49174916
49184917 if (Z_ARRVAL_P (array )-> nNumOfElements <= 1 ) { /* nothing to do */
4919- ZVAL_COPY (return_value , array );
4920- return ;
4918+ RETURN_COPY (array );
49214919 }
49224920
49234921 if (sort_type == PHP_SORT_STRING ) {
@@ -6504,8 +6502,7 @@ PHP_FUNCTION(array_filter)
65046502 ZEND_PARSE_PARAMETERS_END ();
65056503
65066504 if (zend_hash_num_elements (Z_ARRVAL_P (array )) == 0 ) {
6507- RETVAL_EMPTY_ARRAY ();
6508- return ;
6505+ RETURN_EMPTY_ARRAY ();
65096506 }
65106507 array_init (return_value );
65116508
@@ -6758,8 +6755,7 @@ PHP_FUNCTION(array_map)
67586755
67596756 /* Short-circuit: if no callback and only one array, just return it. */
67606757 if (!ZEND_FCI_INITIALIZED (fci ) || !maxlen ) {
6761- ZVAL_COPY (return_value , & arrays [0 ]);
6762- return ;
6758+ RETURN_COPY (& arrays [0 ]);
67636759 }
67646760
67656761 array_init_size (return_value , maxlen );
@@ -6977,8 +6973,7 @@ PHP_FUNCTION(array_chunk)
69776973
69786974 if (size > num_in ) {
69796975 if (num_in == 0 ) {
6980- RETVAL_EMPTY_ARRAY ();
6981- return ;
6976+ RETURN_EMPTY_ARRAY ();
69826977 }
69836978 size = num_in ;
69846979 }
0 commit comments