3v4l.org

run code in 150+ 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.0.0 - 7.1.0
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 hhvm-3.10.0 - 3.12.0
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 Notice: Undefined variable: folderlabel in /in/QGq0O on line 5 Notice: Undefined variable: folderlabel in /in/QGq0O on line 5 Notice: Undefined variable: folderlabel 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