3v4l.org

run code in 300+ PHP versions simultaneously
<?php // ini_set('max_execution_time', 61200); $path = 'C:/wamp64/www/KMD/verif/SS22 International Range (2000x2000 jpeg)/'; $dir = $path; $allFiles = scandir($dir); // Create CSV output file $chemin = 'csv/photos.csv'; $delimiteur = ';'; $fichier_csv = fopen($chemin, 'w+'); fprintf($fichier_csv, chr(0xEF) . chr(0xBB) . chr(0xBF)); // Get KMD $kmd = []; if (($handle = fopen("KMD.csv", "r")) !== FALSE) { fgets($handle); // skip header line while (($data = fgetcsv($handle, 0, ";")) !== FALSE) { if ($data[0] != null) { $kmd[] = $data[9].'_'.$data[12]; } } fclose($handle); } // Check files foreach($allFiles as $file) { if (!in_array($file, array(".",".."))) { $file = $dir.$file; $filename = basename( $file ); //We delete Online version- $explode = explode("-", $filename); // echo $explode[1]; //14109_NOR_Tauro_Hooded_Jacket_Men_a.jpg $explode2 = explode("_", $explode[1]); $name_picture = $explode2[0].'_'.$explode2[1]; // echo $name_picture; if (! in_array($name_picture, $kmd)) { $resultat = [$name_picture,'Missing image']; print_r($name_file.': Missing image'); echo "<br>"; } else { $resultat = [$name_picture,'Image in folder']; print_r($name_picture.': Image in folder'); echo "<br>"; } fputcsv($fichier_csv, $resultat, $delimiteur); } } fclose($fichier_csv);//close
Output for git.master, git.master_jit
Warning: scandir(): open_basedir restriction in effect. File(C:/wamp64/www/KMD/verif/SS22 International Range (2000x2000 jpeg)/) is not within the allowed path(s): (/tmp:/in:/etc) in /in/kJ91t on line 8 Warning: scandir(C:/wamp64/www/KMD/verif/SS22 International Range (2000x2000 jpeg)/): Failed to open directory: Operation not permitted in /in/kJ91t on line 8 Warning: scandir(): (errno 1): Operation not permitted in /in/kJ91t on line 8 Warning: fopen(): open_basedir restriction in effect. File(csv/photos.csv) is not within the allowed path(s): (/tmp:/in:/etc) in /in/kJ91t on line 14 Warning: fopen(csv/photos.csv): Failed to open stream: Operation not permitted in /in/kJ91t on line 14 Fatal error: Uncaught TypeError: fprintf(): Argument #1 ($stream) must be of type resource, bool given in /in/kJ91t:15 Stack trace: #0 /in/kJ91t(15): fprintf(false, '\xEF\xBB\xBF') #1 {main} thrown in /in/kJ91t on line 15
Process exited with code 255.
Output for rfc.property-hooks
Warning: scandir(): open_basedir restriction in effect. File(C:/wamp64/www/KMD/verif/SS22 International Range (2000x2000 jpeg)/) is not within the allowed path(s): (/tmp:/in:/etc) in /in/kJ91t on line 8 Warning: scandir(C:/wamp64/www/KMD/verif/SS22 International Range (2000x2000 jpeg)/): Failed to open directory: Operation not permitted in /in/kJ91t on line 8 Warning: scandir(): (errno 1): Operation not permitted in /in/kJ91t on line 8 Warning: fopen(): open_basedir restriction in effect. File(csv/photos.csv) is not within the allowed path(s): (/tmp:/in:/etc) in /in/kJ91t on line 14 Warning: fopen(csv/photos.csv): Failed to open stream: Operation not permitted in /in/kJ91t on line 14 Fatal error: Uncaught TypeError: fprintf(): Argument #1 ($stream) must be of type resource, false given in /in/kJ91t:15 Stack trace: #0 /in/kJ91t(15): fprintf(false, '\xEF\xBB\xBF') #1 {main} thrown in /in/kJ91t on line 15
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
29.23 ms | 409 KiB | 5 Q