Ajax
Ajax Examples
Ajax Tutorials
Scripts and Programs
Javascript
Javascript Examples Tutorials
DHTML Tutorials
Javascript References
Scripts and Programs
HTML
HTML Tutorials
HTML References
HTML DOM 0 References
HTML DOM 2 References
CSS
CSS Tutorials
CSS References
PHP
PHP Source Code
PHP References
Scripts and Programs
C#
C# Source Code
C# Examples
Bookmark this on Delicious
Share on Facebook
Slashdot It!
Digg
PHP
:
Function Reference
:
Advanced PHP debugger
: apd_croak
apd_croak
Throw an error, a callstack and then exit
(
PECL apd:0.2-0.4
)
void
apd_croak
(
string
warning
[,
string
delimiter
] )
Example 221.
apd_croak()
example
copy to clipboard
<?php
apd_croak
(
"Some Warning"
,
"<P>"
);
?>
<< apd_continue
PHP
:
Function Reference
:
Advanced PHP debugger
: apd_croak
apd_dump_function_table >>
Code Examples / Notes » apd_croak
php
// A function that "ASSERTS", ie that dies if the boolean in parameter is false
// ex: verify( $myDatabase->Connect() );
function verify( $bResult )
{
if (!bResult)
{
echo "<hr><h1>ERROR</h1><hr>";
echo "<pre>Last call arguments:\n";
for($i=0;$i<func_num_args();$i++)
{ echo "→";
print_r( func_get_arg ($i) );
echo "←\n";
}
if (sizeof($_GET))
{ echo "<hr>GET VARS\n";
print_r( $_GET );
}
if (sizeof($_POST))
{ echo "<hr>POST VARS\n";
print_r( $_POST );
}
if (sizeof($_SERVER))
{ echo "<hr>SERVER VARS\n";
print_r( $_SERVER );
}
if (sizeof($_COOKIE ))
{ echo "<hr>COOKIE VARS\n";
print_r( $_COOKIE );
}
// Disable if not on a protected server
if (sizeof($_SESSION ))
{ echo "<hr>SESSION VARS\n";
print_r( $_SESSION );
}
echo "</pre>";
echo "<hr>";
if (function_exists("apd_callstack"))
{ apd_croak("Error !");
}
else
{ die(1);
}
}
}
Change Language
apd_breakpoint
apd_callstack
apd_clunk
apd_continue
apd_croak
apd_dump_function_table
apd_dump_persistent_resources
apd_dump_regular_resources
apd_echo
apd_get_active_symbols
apd_set_pprof_trace
apd_set_session_trace
apd_set_session
apd_set_socket_session_trace
override_function
rename_function