- version 3.6
Check those constraints:
$this->anything()
<?php | |
/** | |
* SplClassLoader implementation that implements the technical interoperability | |
* standards for PHP 5.3 namespaces and class names. | |
* | |
* http://groups.google.com/group/php-standards/web/final-proposal | |
* | |
* // Example which loads classes for the Doctrine Common package in the | |
* // Doctrine\Common namespace. |
<?php defined('SYSPATH') or die('No direct script access.'); | |
/** | |
* Extend this class if you want your model cached. Example usage: | |
* | |
* 1. Model | |
* class Model_User extends ORM_Cached {} | |
* | |
* 2. Usage | |
* |
CREATE FUNCTION STRINGDECODE(str TEXT CHARSET utf8) | |
RETURNS text CHARSET utf8 DETERMINISTIC | |
BEGIN | |
declare pos int; | |
declare escape char(6) charset utf8; | |
declare unescape char(3) charset utf8; | |
set pos = locate('\\u', str); | |
while pos > 0 do | |
set escape = substring(str, pos, 6); | |
set unescape = char(conv(substring(escape,3),16,10) using ucs2); |
<?php | |
/** | |
* Benchmark: Reflection Performance | |
* | |
* Conclusion: there is no performance-gain from caching reflection-objects. | |
*/ | |
define('NUM_TESTS', 10); |
<?php | |
/** | |
* Shutdown process handler, allows you to unregister a process (not supported natively in PHP) | |
* Usage: | |
* $sd = new System_ShutdownProcess($callable); | |
* $sd->register() /// $sd->unregister() | |
* or via factory | |
* $sd = System_ShutdownProcess::factory($callable)->register() | |
*/ |
<?php defined('SYSPATH') or die('No direct script access.'); | |
class Kohana extends Kohana_Core { | |
/** | |
* Augments the core method for two reasons: | |
* 1) Reserve an extra 1M memory to allow handling memory_limit violation. | |
* 2) Reserve more exec time to allow max_execution_time violation. | |
* | |
* Note: keep variable creation at a minimum. |
<?php | |
echo phpversion() . PHP_EOL; | |
$lists = array('hoge'); | |
array_walk($lists, 'trim'); | |
if (current($lists) !== false) { | |
echo 'o'; | |
} else { | |
echo 'x'; | |
} |
<?php | |
class MySQLi_Database extends Database { | |
... | |
public function multiquery($sql) | |
{ | |
// Make sure the database is connected |
<?php | |
class Database_MySQL_HHVM_Result { | |
protected $_ref; | |
public function current() | |
{ | |
if ($this->_current_row !== $this->_internal_row AND ! $this->seek($this->_current_row)) | |
return NULL; |