寫法的不同對程式的執行會造成多少影響

edited 十月 2013 in PHP新手區
以下三個寫法是作同樣的事,
請教哪一種寫法實際執行時較有效率 ?

1.
$source_dir =& $_POST;
$goal_dir =& $_POST;
$source_name =& $_POST;
$goal_name =& $_POST;

copy( stripslashes($source_dir.$source_name) , stripslashes($goal_dir.$goal_name) );


2.

$source_path = stripslashes( $_POST.$_POST );
$goal_path = stripslashes( $_POST.$_POST );
copy( $source_path , $goal_path );


3.

copy( stripslashes($_POST.$_POST) ,
stripslashes($_POST.$_POST) );





原始討論: http://twpug.net/x/modules/newbb/viewtopic.php?topic_id=45

評論

Sign In or Register to comment.