3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function copyFiles($array) { for($i = 0;$i < count($array);$i++){ copy("./".$array[$i],"/$folderlabel/".$array[$i]);} } $files = array ( DSC02425.jpg, DSC02426.jpg, DSC02432.jpg, DSC02437.jpg ); copyFiles($files);
Output for 7.2.11
Warning: Use of undefined constant DSC02425 - assumed 'DSC02425' (this will throw an Error in a future version of PHP) in /in/QGq0O on line 9 Warning: Use of undefined constant jpg - assumed 'jpg' (this will throw an Error in a future version of PHP) in /in/QGq0O on line 9 Warning: Use of undefined constant DSC02426 - assumed 'DSC02426' (this will throw an Error in a future version of PHP) in /in/QGq0O on line 10 Warning: Use of undefined constant jpg - assumed 'jpg' (this will throw an Error in a future version of PHP) in /in/QGq0O on line 10 Warning: Use of undefined constant DSC02432 - assumed 'DSC02432' (this will throw an Error in a future version of PHP) in /in/QGq0O on line 11 Warning: Use of undefined constant jpg - assumed 'jpg' (this will throw an Error in a future version of PHP) in /in/QGq0O on line 11 Warning: Use of undefined constant DSC02437 - assumed 'DSC02437' (this will throw an Error in a future version of PHP) in /in/QGq0O on line 12 Warning: Use of undefined constant jpg - assumed 'jpg' (this will throw an Error in a future version of PHP) in /in/QGq0O on line 12 Notice: Undefined variable: folderlabel in /in/QGq0O on line 5 Warning: copy(): open_basedir restriction in effect. File(./DSC02425jpg) is not within the allowed path(s): (/tmp:/in:/etc) in /in/QGq0O on line 5 Notice: Undefined variable: folderlabel in /in/QGq0O on line 5 Warning: copy(): open_basedir restriction in effect. File(./DSC02426jpg) is not within the allowed path(s): (/tmp:/in:/etc) in /in/QGq0O on line 5 Notice: Undefined variable: folderlabel in /in/QGq0O on line 5 Warning: copy(): open_basedir restriction in effect. File(./DSC02432jpg) is not within the allowed path(s): (/tmp:/in:/etc) in /in/QGq0O on line 5 Notice: Undefined variable: folderlabel in /in/QGq0O on line 5 Warning: copy(): open_basedir restriction in effect. File(./DSC02437jpg) is not within the allowed path(s): (/tmp:/in:/etc) in /in/QGq0O on line 5
Output for 7.2.6
Warning: Use of undefined constant DSC02425 - assumed 'DSC02425' (this will throw an Error in a future version of PHP) in /in/QGq0O on line 9 Warning: Use of undefined constant jpg - assumed 'jpg' (this will throw an Error in a future version of PHP) in /in/QGq0O on line 9 Warning: Use of undefined constant DSC02426 - assumed 'DSC02426' (this will throw an Error in a future version of PHP) in /in/QGq0O on line 10 Warning: Use of undefined constant jpg - assumed 'jpg' (this will throw an Error in a future version of PHP) in /in/QGq0O on line 10 Warning: Use of undefined constant DSC02432 - assumed 'DSC02432' (this will throw an Error in a future version of PHP) in /in/QGq0O on line 11 Warning: Use of undefined constant jpg - assumed 'jpg' (this will throw an Error in a future version of PHP) in /in/QGq0O on line 11 Warning: Use of undefined constant DSC02437 - assumed 'DSC02437' (this will throw an Error in a future version of PHP) in /in/QGq0O on line 12 Warning: Use of undefined constant jpg - assumed 'jpg' (this will throw an Error in a future version of PHP) in /in/QGq0O on line 12 Notice: Undefined variable: folderlabel in /in/QGq0O on line 5 Warning: copy(): open_basedir restriction in effect. File(./DSC02425jpg) is not within the allowed path(s): (/tmp:/in) in /in/QGq0O on line 5 Notice: Undefined variable: folderlabel in /in/QGq0O on line 5 Warning: copy(): open_basedir restriction in effect. File(./DSC02426jpg) is not within the allowed path(s): (/tmp:/in) in /in/QGq0O on line 5 Notice: Undefined variable: folderlabel in /in/QGq0O on line 5 Warning: copy(): open_basedir restriction in effect. File(./DSC02432jpg) is not within the allowed path(s): (/tmp:/in) in /in/QGq0O on line 5 Notice: Undefined variable: folderlabel in /in/QGq0O on line 5 Warning: copy(): open_basedir restriction in effect. File(./DSC02437jpg) is not within the allowed path(s): (/tmp:/in) in /in/QGq0O on line 5
Output for 7.2.0
Warning: Use of undefined constant DSC02425 - assumed 'DSC02425' (this will throw an Error in a future version of PHP) in /in/QGq0O on line 9 Warning: Use of undefined constant jpg - assumed 'jpg' (this will throw an Error in a future version of PHP) in /in/QGq0O on line 9 Warning: Use of undefined constant DSC02426 - assumed 'DSC02426' (this will throw an Error in a future version of PHP) in /in/QGq0O on line 10 Warning: Use of undefined constant jpg - assumed 'jpg' (this will throw an Error in a future version of PHP) in /in/QGq0O on line 10 Warning: Use of undefined constant DSC02432 - assumed 'DSC02432' (this will throw an Error in a future version of PHP) in /in/QGq0O on line 11 Warning: Use of undefined constant jpg - assumed 'jpg' (this will throw an Error in a future version of PHP) in /in/QGq0O on line 11 Warning: Use of undefined constant DSC02437 - assumed 'DSC02437' (this will throw an Error in a future version of PHP) in /in/QGq0O on line 12 Warning: Use of undefined constant jpg - assumed 'jpg' (this will throw an Error in a future version of PHP) in /in/QGq0O on line 12 Notice: Undefined variable: folderlabel in /in/QGq0O on line 5 Warning: copy(./DSC02425jpg): failed to open stream: No such file or directory in /in/QGq0O on line 5 Notice: Undefined variable: folderlabel in /in/QGq0O on line 5 Warning: copy(./DSC02426jpg): failed to open stream: No such file or directory in /in/QGq0O on line 5 Notice: Undefined variable: folderlabel in /in/QGq0O on line 5 Warning: copy(./DSC02432jpg): failed to open stream: No such file or directory in /in/QGq0O on line 5 Notice: Undefined variable: folderlabel in /in/QGq0O on line 5 Warning: copy(./DSC02437jpg): failed to open stream: No such file or directory in /in/QGq0O on line 5
Output for 7.1.20
Notice: Use of undefined constant DSC02425 - assumed 'DSC02425' in /in/QGq0O on line 9 Notice: Use of undefined constant jpg - assumed 'jpg' in /in/QGq0O on line 9 Notice: Use of undefined constant DSC02426 - assumed 'DSC02426' in /in/QGq0O on line 10 Notice: Use of undefined constant jpg - assumed 'jpg' in /in/QGq0O on line 10 Notice: Use of undefined constant DSC02432 - assumed 'DSC02432' in /in/QGq0O on line 11 Notice: Use of undefined constant jpg - assumed 'jpg' in /in/QGq0O on line 11 Notice: Use of undefined constant DSC02437 - assumed 'DSC02437' in /in/QGq0O on line 12 Notice: Use of undefined constant jpg - assumed 'jpg' in /in/QGq0O on line 12 Notice: Undefined variable: folderlabel in /in/QGq0O on line 5 Warning: copy(): open_basedir restriction in effect. File(./DSC02425jpg) is not within the allowed path(s): (/tmp:/in) in /in/QGq0O on line 5 Notice: Undefined variable: folderlabel in /in/QGq0O on line 5 Warning: copy(): open_basedir restriction in effect. File(./DSC02426jpg) is not within the allowed path(s): (/tmp:/in) in /in/QGq0O on line 5 Notice: Undefined variable: folderlabel in /in/QGq0O on line 5 Warning: copy(): open_basedir restriction in effect. File(./DSC02432jpg) is not within the allowed path(s): (/tmp:/in) in /in/QGq0O on line 5 Notice: Undefined variable: folderlabel in /in/QGq0O on line 5 Warning: copy(): open_basedir restriction in effect. File(./DSC02437jpg) is not within the allowed path(s): (/tmp:/in) in /in/QGq0O on line 5
Output for 7.0.0 - 7.1.10
Notice: Use of undefined constant DSC02425 - assumed 'DSC02425' in /in/QGq0O on line 9 Notice: Use of undefined constant jpg - assumed 'jpg' in /in/QGq0O on line 9 Notice: Use of undefined constant DSC02426 - assumed 'DSC02426' in /in/QGq0O on line 10 Notice: Use of undefined constant jpg - assumed 'jpg' in /in/QGq0O on line 10 Notice: Use of undefined constant DSC02432 - assumed 'DSC02432' in /in/QGq0O on line 11 Notice: Use of undefined constant jpg - assumed 'jpg' in /in/QGq0O on line 11 Notice: Use of undefined constant DSC02437 - assumed 'DSC02437' in /in/QGq0O on line 12 Notice: Use of undefined constant jpg - assumed 'jpg' in /in/QGq0O on line 12 Notice: Undefined variable: folderlabel in /in/QGq0O on line 5 Warning: copy(./DSC02425jpg): failed to open stream: No such file or directory in /in/QGq0O on line 5 Notice: Undefined variable: folderlabel in /in/QGq0O on line 5 Warning: copy(./DSC02426jpg): failed to open stream: No such file or directory in /in/QGq0O on line 5 Notice: Undefined variable: folderlabel in /in/QGq0O on line 5 Warning: copy(./DSC02432jpg): failed to open stream: No such file or directory in /in/QGq0O on line 5 Notice: Undefined variable: folderlabel in /in/QGq0O on line 5 Warning: copy(./DSC02437jpg): failed to open stream: No such file or directory in /in/QGq0O on line 5
Output for 5.0.4 - 5.6.28
Notice: Use of undefined constant DSC02425 - assumed 'DSC02425' in /in/QGq0O on line 9 Notice: Use of undefined constant jpg - assumed 'jpg' in /in/QGq0O on line 9 Notice: Use of undefined constant DSC02426 - assumed 'DSC02426' in /in/QGq0O on line 10 Notice: Use of undefined constant jpg - assumed 'jpg' in /in/QGq0O on line 10 Notice: Use of undefined constant DSC02432 - assumed 'DSC02432' in /in/QGq0O on line 11 Notice: Use of undefined constant jpg - assumed 'jpg' in /in/QGq0O on line 11 Notice: Use of undefined constant DSC02437 - assumed 'DSC02437' in /in/QGq0O on line 12 Notice: Use of undefined constant jpg - assumed 'jpg' in /in/QGq0O on line 13 Notice: Undefined variable: folderlabel in /in/QGq0O on line 5 Warning: copy(./DSC02425jpg): failed to open stream: No such file or directory in /in/QGq0O on line 5 Notice: Undefined variable: folderlabel in /in/QGq0O on line 5 Warning: copy(./DSC02426jpg): failed to open stream: No such file or directory in /in/QGq0O on line 5 Notice: Undefined variable: folderlabel in /in/QGq0O on line 5 Warning: copy(./DSC02432jpg): failed to open stream: No such file or directory in /in/QGq0O on line 5 Notice: Undefined variable: folderlabel in /in/QGq0O on line 5 Warning: copy(./DSC02437jpg): failed to open stream: No such file or directory in /in/QGq0O on line 5
Output for 4.3.2 - 5.0.3
Notice: Use of undefined constant DSC02425 - assumed 'DSC02425' in /in/QGq0O on line 9 Notice: Use of undefined constant jpg - assumed 'jpg' in /in/QGq0O on line 9 Notice: Use of undefined constant DSC02426 - assumed 'DSC02426' in /in/QGq0O on line 10 Notice: Use of undefined constant jpg - assumed 'jpg' in /in/QGq0O on line 10 Notice: Use of undefined constant DSC02432 - assumed 'DSC02432' in /in/QGq0O on line 11 Notice: Use of undefined constant jpg - assumed 'jpg' in /in/QGq0O on line 11 Notice: Use of undefined constant DSC02437 - assumed 'DSC02437' in /in/QGq0O on line 12 Notice: Use of undefined constant jpg - assumed 'jpg' in /in/QGq0O on line 13 Notice: Undefined variable: folderlabel in /in/QGq0O on line 5 Warning: copy(./DSC02425jpg): failed to open stream: No such file or directory in /in/QGq0O on line 5 Notice: Undefined variable: folderlabel in /in/QGq0O on line 5 Warning: copy(./DSC02426jpg): failed to open stream: No such file or directory in /in/QGq0O on line 5 Notice: Undefined variable: folderlabel in /in/QGq0O on line 5 Warning: copy(./DSC02432jpg): failed to open stream: No such file or directory in /in/QGq0O on line 5 Notice: Undefined variable: folderlabel in /in/QGq0O on line 5 Warning: copy(./DSC02437jpg): failed to open stream: No such file or directory in /in/QGq0O on line 5
Output for 4.3.0 - 4.3.1
Notice: Use of undefined constant DSC02425 - assumed 'DSC02425' in /in/QGq0O on line 9 Notice: Use of undefined constant jpg - assumed 'jpg' in /in/QGq0O on line 9 Notice: Use of undefined constant DSC02426 - assumed 'DSC02426' in /in/QGq0O on line 10 Notice: Use of undefined constant jpg - assumed 'jpg' in /in/QGq0O on line 10 Notice: Use of undefined constant DSC02432 - assumed 'DSC02432' in /in/QGq0O on line 11 Notice: Use of undefined constant jpg - assumed 'jpg' in /in/QGq0O on line 11 Notice: Use of undefined constant DSC02437 - assumed 'DSC02437' in /in/QGq0O on line 12 Notice: Use of undefined constant jpg - assumed 'jpg' in /in/QGq0O on line 13 Notice: Undefined variable: folderlabel in /in/QGq0O on line 5 Warning: copy(./DSC02425jpg) [http://www.php.net/function.copy]: failed to create stream: No such file or directory in /in/QGq0O on line 5 Notice: Undefined variable: folderlabel in /in/QGq0O on line 5 Warning: copy(./DSC02426jpg) [http://www.php.net/function.copy]: failed to create stream: No such file or directory in /in/QGq0O on line 5 Notice: Undefined variable: folderlabel in /in/QGq0O on line 5 Warning: copy(./DSC02432jpg) [http://www.php.net/function.copy]: failed to create stream: No such file or directory in /in/QGq0O on line 5 Notice: Undefined variable: folderlabel in /in/QGq0O on line 5 Warning: copy(./DSC02437jpg) [http://www.php.net/function.copy]: failed to create stream: No such file or directory in /in/QGq0O on line 5