<?php
static class StackTest extends PHPUnit_Framework_TestCase
{
public function testPushAndPop()
{
$stack = array();
$this->assertEquals(0, count($stack));
array_push($stack, 'foo');
$this->assertEquals('foo', $stack[count($stack)-1]);
$this->assertEquals(1, count($stack));
$this->assertEquals('foo', array_pop($stack));
$this->assertEquals(0, count($stack));
}
}
StackTest->testPushAndPop();
?>
- Output for 5.4.0 - 5.4.15
- Parse error: syntax error, unexpected 'class' (T_CLASS), expecting :: (T_PAAMAYIM_NEKUDOTAYIM) in /in/qVYeF on line 3
Process exited with code 255. - Output for 5.3.0 - 5.3.25
- Parse error: syntax error, unexpected T_CLASS, expecting T_PAAMAYIM_NEKUDOTAYIM in /in/qVYeF on line 3
Process exited with code 255.
preferences:
181.89 ms | 1395 KiB | 49 Q