3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $form_validation_rules = array( array('field' => 'email', 'label' => 'E-Mail-Adresse', 'rules' => 'trim|is_unique[bdb_users.email]|valid_email|required|xss_clean'), array('field' => 'first_name', 'label' => 'Vorname', 'rules' => 'trim|required|xss_clean'), array('field' => 'last_name', 'label' => 'Nachname', 'rules' => 'trim|required|xss_clean'), array('field' => 'tel', 'label' => 'Telefon', 'rules' => 'trim|required|xss_clean'), array('field' => 'address', 'label' => 'Adresse', 'rules' => 'trim|required|xss_clean'), array('field' => 'company', 'label' => 'Unternehmen', 'rules' => 'trim|required|xss_clean'), array('field' => 'password', 'label' => 'Passwort', 'rules' => 'trim|required|xss_clean'), array('field' => 'position', 'label' => 'Position', 'rules' => 'trim|xss_clean'), array('field' => 'department', 'label' => 'Abteilung', 'rules' => 'trim|xss_clean'), array('field' => 'credits', 'label' => 'Credits', 'rules' => 'trim|required|xss_clean|integer'), ); $x = array_map(function($element){return $element['field']}, $form_validation_rules); var_dump($x);
Output for 5.3.0 - 5.4.31
Parse error: syntax error, unexpected '}' in /in/pgWZ7 on line 16
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_FUNCTION, expecting ')' in /in/pgWZ7 on line 16
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_FUNCTION, expecting ')' in /in/pgWZ7 on line 16
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `')'' in /in/pgWZ7 on line 16
Process exited with code 255.