All checks were successful
		
		
	
	 The build was successful.
				
			In most (all?) modern OOP languages class members visibility is assumed to be private and programmer has to consciously set it to public or protected. PHP has the different approach what can cause a security flaws in written scripts. AerScript will not follow this way, as it seems to be conceptually broken.
		
			
				
	
	
		
			22 lines
		
	
	
		
			490 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			490 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| define TEST_CONSTANT 'This is a global constant';
 | |
| 
 | |
| class Program {
 | |
| 	const TEST_CONSTANT = 'This is a class constant';
 | |
| 
 | |
| 	private void constant_test() {
 | |
| 		const TEST_CONSTANT = 'This is a local constant';
 | |
| 		var_dump(TEST_CONSTANT);
 | |
| 	}
 | |
| 
 | |
| 	public void main() {
 | |
| 		int $var = 69;
 | |
| 		var_dump(TEST_CONSTANT);
 | |
| 		$this->constant_test();
 | |
| 		var_dump(TEST_CONSTANT);
 | |
| 		var_dump($this->TEST_CONSTANT);
 | |
| 		const TEST_CONSTANT = 'Local constant overrides a global constant';
 | |
| 		var_dump(TEST_CONSTANT);
 | |
| 	}
 | |
| 
 | |
| }
 |