Obsolete:4991

From Wikitech
Jump to navigation Jump to search
<?php

class StudlyCaps {
	function StudlyCaps() {
	}
	function camelCase() {
	}
	function lower() {
	}
	function UPPER() {
	}
}

print PHP_VERSION . ": ". implode(" ", get_class_methods("StudlyCaps")) . "\n";

PHP4 lowercases class and function names:

 $ /opt/php441/bin/php studly.php
 4.4.1: studlycaps camelcase lower upper

But PHP5 retains the case:

 $ /opt/php51/bin/php studly.php 
 5.1.2: StudlyCaps camelCase lower UPPER