3v4l.org

run code in 300+ PHP versions simultaneously
<?php // composer require delboy1978uk/form use Del\Form\AbstractForm; use Del\Form\Field\Text\EmailAddress; use Del\Form\Field\Text; class MemberForm extends AbstractForm { public function init() { $name = new Text('name'); $email = new EmailAddress('email'); $this->addField($email); // Put in member array field s here } } $form = new MemberForm(); $form->populate($postData); if($form->isValid()) { $data = $form->getValues(); // Filtered data! Valid input! // Do yo thang! }
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.29, 8.2.0 - 8.2.21, 8.3.0 - 8.3.9
Fatal error: Uncaught Error: Class "Del\Form\AbstractForm" not found in /in/86hf7:9 Stack trace: #0 {main} thrown in /in/86hf7 on line 9
Process exited with code 255.
Output for 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
Fatal error: Uncaught Error: Class 'Del\Form\AbstractForm' not found in /in/86hf7:9 Stack trace: #0 {main} thrown in /in/86hf7 on line 9
Process exited with code 255.
Output for 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33
Fatal error: Class 'Del\Form\AbstractForm' not found in /in/86hf7 on line 9
Process exited with code 255.
Output for 5.6.38
Fatal error: Class 'Del\Form\AbstractForm' not found in /in/86hf7 on line 10
Process exited with code 255.

preferences:
231.58 ms | 403 KiB | 254 Q