<?php
$str = "um dois três quatro cinco seis";
echo $str, "<br>\n";
echo trim($str), "<br>\n";
echo trim($str, ' '), "<br>\n";
echo preg_replace('/[ ]*/', '', $str), "\n\n";
class Teste {
public function __construct() {
/* */
}
public static function __callStatic($function, $arguments){
if(method_exists(__CLASS__, $function)){
echo "teste fake __ constructor \n";
call_user_func_array(
array(__CLASS__, $function),
$arguments
);
} else {
echo "método não existe \n\n";
}
}
public function teste(){
echo "teste __ method\n";
}
}
Teste::teste();
preferences:
65.69 ms | 402 KiB | 5 Q