I'm using the skeleton application for ZF2.0.0Beta3.
So, normally I would just use Zend_Debug::dump($someVar); however, in ZF2 it doesn't include the zend classes it seems.
The error is: Fatal Error: Class 'Zend_Debug' not found..
This is probably a really basic question, but what's the best way to include that class? Do I have to put require_once('path/to/Debug.php');
?
It still exists in ZF2, but since ZF2 started using PHP namespaces, you would now have to call it using the Zend
namespace:
\Zend\Debug\Debug::dump($var);
or add a use statement at the beginning of the file and call it like this:
use Zend\Debug\Debug;
Debug::dump($var);
In my case this was the correct namespace-path :
\Zend\Debug\Debug::dump($form);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With