Jump to content

Obsolete:4991

From Wikitech
Note: This page was created as a temporary pastebin and probably doesn't make any sense without its proper context
<?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