- Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.23
- Parse error: syntax error, unexpected '=' in /in/LkDjR on line 24
Process exited with code 255.
<?php
class PHPApprentice
{
private static $velocity = '';
private static $initialized = false;
public static function initialize ()
{
if ( self::initialized )
return;
self::$initialized = true;
self::$velocity = 'fast!';
}
public static function getVelocity ()
{
self::initialize();
return self::$velocity;
}
public static function setVelocity ( $value )
{
self::$velocity = $value;
self::initialized = true;
}
}
PHPApprentice::setVelocity ( 'Ludicrous Speed!!' );
echo PHPApprentice::getVelocity();