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) { $isValidTimestamp = Validation::validateTimestamp($this->$requiredTimestamp); if ( $key === 0 && !$isValidTimestamp || ($key !== 0 && ($this->{$requiredArray[($key - 1)]} == '0000-00-00 00:00:00' || !Validation::validateTimestamp($this->{$requiredArray[($key - 1)]}) || strtotime($this->$requiredTimestamp) > strtotime($this->{$requiredArray[($key - 1)]}))) ) { $timestampIsValid = false; break; } } return $timestampIsValid; } }
Output for 7.0.0 - 7.0.33, 7.1.0 - 7.1.28, 7.2.0 - 7.2.18, 7.3.0 - 7.3.5
Parse error: syntax error, unexpected 'private' (T_PRIVATE), expecting end of file in /in/cgnkI on line 3
Process exited with code 255.
Output for 5.6.38 - 5.6.40
Parse error: syntax error, unexpected 'private' (T_PRIVATE) in /in/cgnkI on line 3
Process exited with code 255.

preferences:
199.6 ms | 1399 KiB | 98 Q