<?php
class Test {
const ALPHA = 1, BETA = 2, GAMMA = 3;
public $a = "apple", $b = "bread", $c = "candy";
public function __construct() {
// do something
}
}
$t = new Test;
echo Test::ALPHA $t->c $t->$a;
- Output for 5.4.0 - 5.4.28
- Parse error: syntax error, unexpected '$t' (T_VARIABLE), expecting ',' or ';' in /in/RQtqF on line 14
Process exited with code 255. - Output for 5.3.0 - 5.3.28
- Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' in /in/RQtqF on line 14
Process exited with code 255.
preferences:
204.11 ms | 1395 KiB | 65 Q