3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $resolver->setDefaults(array( 'validation_groups' => function (FormInterface $form) { $data = $form->getData(); if (Client::TYPE_PERSON == $data->getType()) { return array('Default', 'person'); } return array('Default', 'company'); }, ));
based on GmfmV
Output for 7.0.5 - 7.3.0rc3
Notice: Undefined variable: resolver in /in/JDuMa on line 4 Fatal error: Uncaught Error: Call to a member function setDefaults() on null in /in/JDuMa:4 Stack trace: #0 {main} thrown in /in/JDuMa on line 4
Process exited with code 255.
Output for 7.0.0 - 7.0.4
Notice: Undefined variable: resolver in /in/JDuMa on line 4 Fatal error: Uncaught Error: Call to a member function setDefaults() on unknown in /in/JDuMa:4 Stack trace: #0 {main} thrown in /in/JDuMa on line 4
Process exited with code 255.
Output for hhvm-3.18.4 - 3.21.0
Notice: Undefined variable: resolver in /in/JDuMa on line 14 Fatal error: Uncaught exception 'BadMethodCallException' with message 'Call to a member function setDefaults() on a non-object (null)' in /in/JDuMa:14 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.30
Notice: Undefined variable: resolver in /in/JDuMa on line 4 Fatal error: Call to a member function setDefaults() on null in /in/JDuMa on line 4
Process exited with code 255.