Jump to content

charley12

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Everything posted by charley12

  1. Ou thank you. <?php //At handler if(error_reporting() !== 0) { //Handle } Really thank you!
  2. Hello. I have my own class for handling errors (not Exceptions). But I want do not handle silent errors (@). <?php set_error_handler(array("Diagnostic_Debugger", "handlePhpError"), E_ALL); $a = array("A", "B"); echo $a[2]; //Yep, handle this. Error about undefied index. echo @$a[2]; //No, do NOT handle this. Is there any solution? Thank you.
  3. Really thank you for your respond. It was really helpful. I appreciate it.
  4. Hello! I'am newbie with regex, but at now I need your help. I write a regex for get exp atribute and content of tag line. <line exp="something"> content </line> function clb($matches) { var_dump($matches); } preg_replace_callback('/<line +exp *= *"([a-zA-Z0-9\.\-\ ]*)">.*\<\/line\>/siu', "clb", $str); If the line tag is only single in $str it's everything okey. array(2) { [0]=> string(45) " content " [1]=> string(9) "something" } But when in $str is more than one line tag, I getting bad result. $str = " <line exp=\"something\"> \n content </line> <line exp=\"something2\"> \n content2 </line> "; array(2) { [0]=> string(96) " content content2 " [1]=> string(9) "something" } I need something like : array(4) { [0]=> string(7) "content" [1]=> string(9) "something" [2]=> string( "content2" [3]=> string(10) "something2" } Where I doing mistake please? Thank you for respond.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.