3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $read_log = file($webserver_root_path.$file_path_log); foreach ($read_log as $num => $log_line) { if (preg_match("/OTL_PROV:S:/i", $log_line)) { $processing_line_num_from=$num; } if (preg_match("/OTL_PROV:E:/i", $log_line)) { $processing_line_num_to=$num; $result_code=1; $t=0; while ($processing_line_num_from<=$processing_line_num_to) { $errorlogtext.=$read_log[$processing_line_num_from]; if ($t==0) { $errorlogtext.="<font color=#AA0000>\n"; $t=1; } $processing_line_num_from++; } $errorlogtext.="</font>\n"; $prov_failure++; } } if ($prov_failure>0) { $fh = fopen($webserver_root_path.$file_path_errorlog, 'w') or die("can't open file"); $stringData = "$errorlogtext\n"; fwrite($fh, $stringData); fclose($fh); echo "Error log : <a href=".$public_includes_path."/fileviewer.php?file=".$file_path_errorlog." target=".$file_path_errorlog.">".$file_name_errorlog."</a> Full log : <a href=".$public_includes_path."/fileviewer.php?file=".$file_path_log." target=".$file_name_log.">".$file_name_log."</a> <font color=#DD0000>X Failure!!</font>\n"; echo "<input type=hidden name=prov_voice_failures[PROXY][$proxy_id][] value=\"Mass Provisioning returned errors!\">"; $provisioning_report.="Error log : <a href=".$public_includes_path."/fileviewer.php?file=".$file_path_errorlog." target=".$file_path_errorlog.">".$file_name_errorlog."</a> Full log : <a href=".$public_includes_path."/fileviewer.php?file=".$file_path_log." target=".$file_name_log.">".$file_name_log."</a> <font color=#DD0000>X Failure!!</font>\n"; } else { echo "<a href=".$public_includes_path."/fileviewer.php?file=".$file_path_log." target=".$file_name_log.">".$file_name_log."</a> <font color=#00AA00>&radic;</font>\n"; $provisioning_report.="<a href=".$public_includes_path."/fileviewer.php?file=".$file_path_log." target=".$file_name_log.">".$file_name_log."</a> <font color=#00AA00>&radic;</font>\n"; }
Output for 7.0.0 - 7.1.0
Notice: Undefined variable: webserver_root_path in /in/5iGUd on line 2 Notice: Undefined variable: file_path_log in /in/5iGUd on line 2 Warning: file(): Filename cannot be empty in /in/5iGUd on line 2 Warning: Invalid argument supplied for foreach() in /in/5iGUd on line 3 Notice: Undefined variable: prov_failure in /in/5iGUd on line 32 Notice: Undefined variable: public_includes_path in /in/5iGUd on line 45 Notice: Undefined variable: file_path_log in /in/5iGUd on line 45 Notice: Undefined variable: file_name_log in /in/5iGUd on line 45 Notice: Undefined variable: file_name_log in /in/5iGUd on line 45 <a href=/fileviewer.php?file= target=></a> <font color=#00AA00>&radic;</font> Notice: Undefined variable: public_includes_path in /in/5iGUd on line 46 Notice: Undefined variable: file_path_log in /in/5iGUd on line 46 Notice: Undefined variable: file_name_log in /in/5iGUd on line 46 Notice: Undefined variable: file_name_log in /in/5iGUd on line 46 Notice: Undefined variable: provisioning_report in /in/5iGUd on line 46
Output for 5.2.9 - 5.6.21
Notice: Undefined variable: file_path_log in /in/5iGUd on line 2 Notice: Undefined variable: webserver_root_path in /in/5iGUd on line 2 Warning: file(): Filename cannot be empty in /in/5iGUd on line 2 Warning: Invalid argument supplied for foreach() in /in/5iGUd on line 3 Notice: Undefined variable: prov_failure in /in/5iGUd on line 32 Notice: Undefined variable: public_includes_path in /in/5iGUd on line 45 Notice: Undefined variable: file_path_log in /in/5iGUd on line 45 Notice: Undefined variable: file_name_log in /in/5iGUd on line 45 Notice: Undefined variable: file_name_log in /in/5iGUd on line 45 <a href=/fileviewer.php?file= target=></a> <font color=#00AA00>&radic;</font> Notice: Undefined variable: public_includes_path in /in/5iGUd on line 46 Notice: Undefined variable: file_path_log in /in/5iGUd on line 46 Notice: Undefined variable: file_name_log in /in/5iGUd on line 46 Notice: Undefined variable: file_name_log in /in/5iGUd on line 46 Notice: Undefined variable: provisioning_report in /in/5iGUd on line 46
Output for 5.1.0 - 5.2.8
Notice: Undefined variable: file_path_log in /in/5iGUd on line 2 Notice: Undefined variable: webserver_root_path in /in/5iGUd on line 2 Warning: Invalid argument supplied for foreach() in /in/5iGUd on line 3 Notice: Undefined variable: prov_failure in /in/5iGUd on line 32 Notice: Undefined variable: public_includes_path in /in/5iGUd on line 45 Notice: Undefined variable: file_path_log in /in/5iGUd on line 45 Notice: Undefined variable: file_name_log in /in/5iGUd on line 45 Notice: Undefined variable: file_name_log in /in/5iGUd on line 45 <a href=/fileviewer.php?file= target=></a> <font color=#00AA00>&radic;</font> Notice: Undefined variable: public_includes_path in /in/5iGUd on line 46 Notice: Undefined variable: file_path_log in /in/5iGUd on line 46 Notice: Undefined variable: file_name_log in /in/5iGUd on line 46 Notice: Undefined variable: file_name_log in /in/5iGUd on line 46 Notice: Undefined variable: provisioning_report in /in/5iGUd on line 46
Output for 5.0.4 - 5.0.5
Notice: Undefined variable: webserver_root_path in /in/5iGUd on line 2 Notice: Undefined variable: file_path_log in /in/5iGUd on line 2 Warning: Invalid argument supplied for foreach() in /in/5iGUd on line 3 Notice: Undefined variable: prov_failure in /in/5iGUd on line 32 Notice: Undefined variable: public_includes_path in /in/5iGUd on line 45 Notice: Undefined variable: file_path_log in /in/5iGUd on line 45 Notice: Undefined variable: file_name_log in /in/5iGUd on line 45 Notice: Undefined variable: file_name_log in /in/5iGUd on line 45 <a href=/fileviewer.php?file= target=></a> <font color=#00AA00>&radic;</font> Notice: Undefined variable: public_includes_path in /in/5iGUd on line 46 Notice: Undefined variable: file_path_log in /in/5iGUd on line 46 Notice: Undefined variable: file_name_log in /in/5iGUd on line 46 Notice: Undefined variable: file_name_log in /in/5iGUd on line 46 Notice: Undefined variable: provisioning_report in /in/5iGUd on line 46
Output for 4.3.0 - 4.3.10, 4.4.0 - 5.0.3
Notice: Undefined variable: webserver_root_path in /in/5iGUd on line 2 Notice: Undefined variable: file_path_log in /in/5iGUd on line 2 Warning: Invalid argument supplied for foreach() in /in/5iGUd on line 3 Notice: Undefined variable: prov_failure in /in/5iGUd on line 32 Notice: Undefined variable: public_includes_path in /in/5iGUd on line 45 Notice: Undefined variable: file_path_log in /in/5iGUd on line 45 Notice: Undefined variable: file_name_log in /in/5iGUd on line 45 Notice: Undefined variable: file_name_log in /in/5iGUd on line 45 <a href=/fileviewer.php?file= target=></a> <font color=#00AA00>&radic;</font> Notice: Undefined variable: public_includes_path in /in/5iGUd on line 46 Notice: Undefined variable: file_path_log in /in/5iGUd on line 46 Notice: Undefined variable: file_name_log in /in/5iGUd on line 46 Notice: Undefined variable: file_name_log in /in/5iGUd on line 46 Notice: Undefined variable: provisioning_report in /in/5iGUd on line 46
Output for 4.3.11
Notice: Undefined variable: webserver_root_path in /in/5iGUd on line 2 Notice: Undefined variable: file_path_log in /in/5iGUd on line 2 Notice: Undefined variable: prov_failure in /in/5iGUd on line 32 Notice: Undefined variable: public_includes_path in /in/5iGUd on line 45 Notice: Undefined variable: file_path_log in /in/5iGUd on line 45 Notice: Undefined variable: file_name_log in /in/5iGUd on line 45 Notice: Undefined variable: file_name_log in /in/5iGUd on line 45 <a href=/fileviewer.php?file= target=></a> <font color=#00AA00>&radic;</font> Notice: Undefined variable: public_includes_path in /in/5iGUd on line 46 Notice: Undefined variable: file_path_log in /in/5iGUd on line 46 Notice: Undefined variable: file_name_log in /in/5iGUd on line 46 Notice: Undefined variable: file_name_log in /in/5iGUd on line 46 Notice: Undefined variable: provisioning_report in /in/5iGUd on line 46