3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php namespace Entity\Repository; /** * Class Validator * @package Entity\Repository */ class Validator extends Generic { const CONDITION_EQUAL = 1; const CONDITION_DOES_NOT_EQUAL = 2; const CONDITION_CONTAIN = 3; const CONDITION_DOES_NOT_CONTAIN = 4; const CONDITION_GREATER_THAN = 5; const CONDITION_LESS_THAN = 6; const CONDITION_STRING_LENGTH_GREATER_THAN = 7; const CONDITION_STRING_LENGTH_LESS_THAN = 8; const CONDITION_MATCH_PARTIAL_REGEX = 9; const CONDITION_NOT_MATCH_PARTIAL_REGEX = 10; const CONDITION_MATCH_EXACT_REGEX = 11; const CONDITION_NOT_MATCH_EXACT_REGEX = 12; public static $conditionNames = array( self::CONDITION_EQUAL => 'Equals', self::CONDITION_DOES_NOT_EQUAL => 'Does Not Equal', self::CONDITION_CONTAIN => 'Contains', self::CONDITION_DOES_NOT_CONTAIN => 'Does Not Contain', self::CONDITION_GREATER_THAN => 'Greater Than', self::CONDITION_LESS_THAN => 'Less Than', self::CONDITION_STRING_LENGTH_GREATER_THAN => 'String Length Greater Than', self::CONDITION_STRING_LENGTH_LESS_THAN => 'String Length Less Than', self::CONDITION_MATCH_PARTIAL_REGEX => 'Match Partial Regex', self::CONDITION_NOT_MATCH_PARTIAL_REGEX => 'Not Match Partial Regex', self::CONDITION_MATCH_EXACT_REGEX => 'Match Exact Regex', self::CONDITION_NOT_MATCH_EXACT_REGEX => 'Not Match Exact Regex' ); /** * Default methods for operating on the condition. * These MAY be overwritten depending on data type used @see \Entity\Validator::isValid() * @var array */ public static $conditionMethods = array( self::CONDITION_EQUAL => function($subject, $value){ return ($subject == $value); } ); }
Output for 5.4.0 - 5.4.20
Parse error: syntax error, unexpected 'function' (T_FUNCTION) in /in/OG6Cf on line 44
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_FUNCTION in /in/OG6Cf on line 44
Process exited with code 255.