Learn some PHP and see variable function names (omg) Friday, Nov 2 2007
English and PHP and Programming PHP, variable function name 6:14 pm
Because my current team consist Java & PHP programmers I start to learn some PHP basic, point of view, and it’s programmer paradigm
I learn that this code is actually works :-p
<?php
$someVariable = “anyName”;
$name = “Jimmy”;$someVariable($name);
function anyName($name) {
echo “$name, Hello World”;
}?>
The statement “$someVariable($name);“ really call method anyName.
Although I fascinated by how dynamic it is (I remember encounter it at VBA), but personally I against it.
I don’t think it is a good practice, and it’ll be hard to be understand by other programmer.
Or is it because my Java programming paradigm….