This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $response = parent::render(); | |
| $response->setContent(str_replace('a','b',$response->getContent())); | |
| return $reponse; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function copy_row($fromid, $overwride = array()) { | |
| $fom = $this->db->getTable('table')->find($fromid); | |
| $to = $this->db->getTable('table')->create(); | |
| $to->fromArray(array_merge($overwride, $from->toArray())); | |
| $to->save(); | |
| } | |
| $new_row = copy_row(1, array('id' => null)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class Ex1 { | |
| private function private_method($val1 , $val2) { | |
| return func_get_args(); | |
| } | |
| } | |
| $obj = new Ex1(); | |
| $r = call_private_method($obj, 'private_method', 'test1', 'test2'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| preg_match('/^([^ ]*) ([^ ]*) ([^ ]*) \[([^]]*)\] "([^ ]*)(?: *([^ ]*) *([^ ]*))?" ([^ ]*) ([^ ]*) "(.*?)" "(.*?)"/', $buf, $log_stat); | |
| list($all, $host, $ident, $user, $time, $method, $resource, $proto, $status, $bytes, $referer, $agent) = $log_stat; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| create table t | |
| ( | |
| id int auto_increment not null primary key, | |
| parent_id int, | |
| in_seq_num int | |
| ); | |
| // parent_id 内の連番を in_seq_num に入れたい | |
| set @lastid := 0; | |
| set @number := 0; |
NewerOlder