3v4l.org

run code in 300+ PHP versions simultaneously
<?php private function timestampIsValid($timestampColumn, $requiredArray = array()) { $requiredArray[] = $this->$timestampColumn; $timestampIsValid = true; foreach($requiredArray as $key => $requiredTimestamp) { if ($key == 0 && !Validation::validateTimestamp($this->$requiredTimestamp)) { $timeStampIsValid = false; break; } if ( $this->{$requiredArray[($key - 1)]} == '0000-00-00 00:00:00' || !Validation::validateTimestamp($this->{$requiredArray[($key - 1)]}) || !Validation::validateTimestamp($this->$requiredTimestamp) || strtotime($this->$requiredTimestamp) > strtotime($this->{$requiredArray[($key - 1)]}) ) { $timestampIsValid = false; break; } } return $timestampIsValid; }
Output for 7.0.0 - 7.0.18, 7.1.0 - 7.1.4
Parse error: syntax error, unexpected 'private' (T_PRIVATE), expecting end of file in /in/h6k4Q on line 3
Process exited with code 255.

preferences:
179.9 ms | 1399 KiB | 31 Q