3v4l.org

run code in 300+ PHP versions simultaneously
<?php //https://github.com/nicolasff/phpredis class RedisMultiErrHandler { private $obj; private $ip; private $port; private $timeout; private $m; private $type; private $commands; public function __construct($redis,$type,$ip,$port,$timeout=0) { $this->ip=$ip; $this->port=$port; $this->timeout=$timeout; $this->type=$type; $this->obj=$redis; $this->m=$this->obj->multi($type); } private function rconnect() { $this->obj=new Redis; $this->obj->connect($this->ip,$this->port,$this->timeout) or die('Error connecting redis2'); $this->m=$this->obj->multi($this->type); } public function __call($name, $arguments) { $this->commands[]=array('name'=>$name, 'arguments'=>$arguments); return $this; } private function handle_exception($e) { $err=$e->getMessage(); $msg=''; foreach($this->commands as $command) { $msg.="Multi sent\tcall ".$command['name']."\targs ".implode(" ",$command['arguments'])."\n"; } $msg.="Caught exception: ".$err."\n"; if(DEBUG_INFO) { $handle2=fopen('redis_multi_log.txt','a'); fwrite($handle2,date('H:i:s')."\t$msg"); fclose($handle2); } if(substr(trim($err),0,37)=='Caught exception: protocol error, got') die('bye'); $this->rconnect(); } public function exec() { $i=0; while(true) { foreach($this->commands as $command) { call_user_func_array(array($this->m, $command['name']), $command['arguments']); // call_user_func_array(array( $this->obj, $command['name']), $command['arguments']); } try{ return $this->m->exec(); break; } catch (Exception $e) { $this->handle_exception($e); if($i<5) $i++; else die('5 time mredis lug'); } } } } class Redis_Cache { private $obj; private $ip; private $port; private $timeout; //public $site_id = 0; protected static $key_request = array(); // private static $instance; protected static $count_requests = 0; /* public static function getInstance() { self::$count_requests++; return (self::$instance === null) ? self::$instance = new self() : self::$instance; }*/ public function set_settings($redis , $ip = '127.0.0.1' , $port ='6379' , $timeout = 0) { $this->ip=$ip; $this->port=$port; $this->timeout=$timeout; $this->obj = $redis; $this->rconnect($redis); } private function rconnect() { $this->obj->pconnect($this->ip,$this->port,$this->timeout) or die('Error connecting redis'); } public function __call($name, $arguments) { $i=0; self::$key_request[] = $arguments[0]; while(true) { try{ j2_timeStamps::getInstance()->addCacheTime($arguments[0] . ' (' . $name . ')'); $return = call_user_func_array(array($this->obj, $name), $arguments); j2_timeStamps::getInstance()->addCacheTime($arguments[0] . ' (' . $name . ')'); return $return; break; } catch (Exception $e) { $this->handle_exception($e,$name,$arguments); if($i<5) $i++; else die('5 time redis lug'); } } } private function handle_exception($e,$name,$args) { $err=$e->getMessage(); $msg="Caught exception: ".$err."\tcall ".$name."\targs ".implode(" ",$args)."\n"; if(DEBUG_INFO) { $handle2=fopen('redis_log.txt','a'); fwrite($handle2,date('H:i:s')."\t$msg"); fclose($handle2); } if(substr(trim($err),0,37)=='Caught exception: protocol error, got') die('bye'); $this->rconnect(); } /* public function set($name , $data) { return $this->obj->set($name , serialize($data)); } */ public function set($name , $time=null , $data) { // self::$key_request[] = $name; if (empty($time)) { j2_timeStamps::getInstance()->addCacheTime($name . ' (set)'); $return = $this->obj->set($name , serialize($data)); j2_timeStamps::getInstance()->addCacheTime($name . ' (set)'); return $return; } else { j2_timeStamps::getInstance()->addCacheTime($name . ' (setex)'); $return = $this->obj->setex($name , $time , serialize($data)); j2_timeStamps::getInstance()->addCacheTime($name . ' (setex)'); return $return; } } public function destroy($name) { j2_timeStamps::getInstance()->addCacheTime($name . ' (del)'); $return = $this->obj->del($name); j2_timeStamps::getInstance()->addCacheTime($name . ' (del)'); return $return; } public function get($name) { j2_timeStamps::getInstance()->addCacheTime($name . ' (get)'); $return = unserialize($this->obj->get($name)); j2_timeStamps::getInstance()->addCacheTime($name . ' (get)'); return $return; } public function get_real($name) { j2_timeStamps::getInstance()->addCacheTime($name . ' (get_real)'); $return = $this->obj->get($name); j2_timeStamps::getInstance()->addCacheTime($name . ' (get_real)'); return $return; } public function get_keys_by_prefix($name) { j2_timeStamps::getInstance()->addCacheTime($name . ' (keys)'); $return = $this->obj->keys($name . "*"); j2_timeStamps::getInstance()->addCacheTime($name . ' (keys)'); return $return; } //purges all cache public function purge() { j2_timeStamps::getInstance()->addCacheTime($name . ' (flushAll)'); $return = $this->obj->flushAll(); j2_timeStamps::getInstance()->addCacheTime($name . ' (flushAll)'); return $return; } /* public function exists($name) { return $this->obj->exists($name); } */ public function destroy_by_prefix($prefix) { j2_timeStamps::getInstance()->addCacheTime($prefix . ' (destroy_by_prefix)'); $return = $this->destroy($this->obj->keys($prefix . "*")); j2_timeStamps::getInstance()->addCacheTime($prefix . ' (destroy_by_prefix)'); return $return; } public function get_requests() { return self::$count_requests; } public function get_key_requests() { return self::$key_request; } public function lifetime($name) { j2_timeStamps::getInstance()->addCacheTime($name . ' (TTL)'); $return = $this->obj->TTL($name); j2_timeStamps::getInstance()->addCacheTime($name . ' (TTL)'); return $return; } /* public function sAdd($keys , $member) { return $this->obj->sAdd($keys , $member); }/**/ /* public function multi($type) { return new RedisMultiErrHandler($this->obj,$type,$this->ip,$this->port,$this->timeout); } */ } /** * Сохраняет данные кеша в статическом массыве, чтобы по несколько раз не дергать кеш */ class Cache extends Redis_Cache { private static $instance; static $static_cache = array(); public static function getInstance() { parent::$count_requests++; return (self::$instance === null) ? self::$instance = new self() : self::$instance; } public function destroy($name, $static_cache = true) { if(is_array($name)) { foreach ($name as $value) { $key = md5($value); if($static_cache) { unset(self::$static_cache[$key]); } parent::destroy($value); } return true; } $key = md5($name); if(array_key_exists($key, self::$static_cache)) { unset(self::$static_cache[$key]); } return parent::destroy($name); } public function get($name, $static_cache = true) { if($static_cache) { $key = md5($name); if(array_key_exists($key, self::$static_cache)) { return self::$static_cache[$key]; } } $return = parent::get($name); if($static_cache) { if($return !== false) { self::$static_cache[$key] = $return; } } return $return; } public function set($name , $time=null , $data = null, $static_cache = true) { $key = md5($name); if($static_cache) { self::$static_cache[$key] = $data; } return parent::set($name, $time, $data); } public function purge() { self::$static_cache = array(); return parent::purge(); } public function hSet($name, $index, $data, $static_cache = true) { if($static_cache) { $key = md5($name); //$index_key = md5($index); $index_key = $index; if(!array_key_exists($key, self::$static_cache)) { self::$static_cache[$key] = array(); } self::$static_cache[$key][$index_key] = $data; } return parent::hSet($name, $index, $data); } public function hGet($name, $index, $static_cache = true) { if($static_cache) { $key = md5($name); //$index_key = md5($index); $index_key = $index; if(array_key_exists($key, self::$static_cache) && array_key_exists($index, self::$static_cache[$key])) { return self::$static_cache[$key][$index_key]; } } $return = parent::hGet($name, $index); if($static_cache) { if($return !== false) { if(!array_key_exists($key, self::$static_cache)) { self::$static_cache[$key] = array(); } self::$static_cache[$key][$index_key] = $return; } } return $return; } /* public function hGetAll($name) { $key = md5($name); if(array_key_exists($key, self::$static_cache)) { return self::$static_cache[$key]; } $return = parent::hGetAll($name); if($return !== false) { self::$static_cache[$key] = $return; } return $return; }*/ }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NMA2i
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  400     0  E > > RETURN                                                   1

Class RedisMultiErrHandler:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NMA2i
function name:  __construct
number of ops:  22
compiled vars:  !0 = $redis, !1 = $type, !2 = $ip, !3 = $port, !4 = $timeout
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
          4        RECV_INIT                                        !4      0
   15     5        ASSIGN_OBJ                                               'ip'
          6        OP_DATA                                                  !2
   16     7        ASSIGN_OBJ                                               'port'
          8        OP_DATA                                                  !3
   17     9        ASSIGN_OBJ                                               'timeout'
         10        OP_DATA                                                  !4
   18    11        ASSIGN_OBJ                                               'type'
         12        OP_DATA                                                  !1
   19    13        ASSIGN_OBJ                                               'obj'
         14        OP_DATA                                                  !0
   20    15        FETCH_OBJ_R                                      ~11     'obj'
         16        INIT_METHOD_CALL                                         ~11, 'multi'
         17        SEND_VAR_EX                                              !1
         18        DO_FCALL                                      0  $12     
         19        ASSIGN_OBJ                                               'm'
         20        OP_DATA                                                  $12
   21    21      > RETURN                                                   null

End of function __construct

Function rconnect:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NMA2i
function name:  rconnect
number of ops:  28
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   NEW                                              $1      'Redis'
          1        DO_FCALL                                      0          
          2        ASSIGN_OBJ                                               'obj'
          3        OP_DATA                                                  $1
   26     4        FETCH_OBJ_R                                      ~3      'obj'
          5        INIT_METHOD_CALL                                         ~3, 'connect'
          6        CHECK_FUNC_ARG                                           
          7        FETCH_OBJ_FUNC_ARG                               $4      'ip'
          8        SEND_FUNC_ARG                                            $4
          9        CHECK_FUNC_ARG                                           
         10        FETCH_OBJ_FUNC_ARG                               $5      'port'
         11        SEND_FUNC_ARG                                            $5
         12        CHECK_FUNC_ARG                                           
         13        FETCH_OBJ_FUNC_ARG                               $6      'timeout'
         14        SEND_FUNC_ARG                                            $6
         15        DO_FCALL                                      0  $7      
         16      > JMPNZ_EX                                         ~8      $7, ->19
         17    > > EXIT                                                     'Error+connecting+redis2'
         18*       BOOL                                             ~8      <true>
   27    19    >   FETCH_OBJ_R                                      ~10     'obj'
         20        INIT_METHOD_CALL                                         ~10, 'multi'
         21        CHECK_FUNC_ARG                                           
         22        FETCH_OBJ_FUNC_ARG                               $11     'type'
         23        SEND_FUNC_ARG                                            $11
         24        DO_FCALL                                      0  $12     
         25        ASSIGN_OBJ                                               'm'
         26        OP_DATA                                                  $12
   28    27      > RETURN                                                   null

End of function rconnect

Function __call:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NMA2i
function name:  __call
number of ops:  10
compiled vars:  !0 = $name, !1 = $arguments
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   30     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   32     2        INIT_ARRAY                                       ~4      !0, 'name'
          3        ADD_ARRAY_ELEMENT                                ~4      !1, 'arguments'
          4        FETCH_OBJ_W                                      $2      'commands'
          5        ASSIGN_DIM                                               $2
          6        OP_DATA                                                  ~4
   33     7        FETCH_THIS                                       ~5      
          8      > RETURN                                                   ~5
   34     9*     > RETURN                                                   null

End of function __call

Function handle_exception:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 20
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 20
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 44
Branch analysis from position: 26
2 jumps found. (Code = 43) Position 1 = 54, Position 2 = 55
Branch analysis from position: 54
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 55
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 44
Branch analysis from position: 20
filename:       /in/NMA2i
function name:  handle_exception
number of ops:  58
compiled vars:  !0 = $e, !1 = $err, !2 = $msg, !3 = $command, !4 = $handle2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   36     0  E >   RECV                                             !0      
   38     1        INIT_METHOD_CALL                                         !0, 'getMessage'
          2        DO_FCALL                                      0  $5      
          3        ASSIGN                                                   !1, $5
   39     4        ASSIGN                                                   !2, ''
   40     5        FETCH_OBJ_R                                      ~8      'commands'
          6      > FE_RESET_R                                       $9      ~8, ->20
          7    > > FE_FETCH_R                                               $9, !3, ->20
   42     8    >   FETCH_DIM_R                                      ~10     !3, 'name'
          9        CONCAT                                           ~11     'Multi+sent%09call+', ~10
         10        CONCAT                                           ~12     ~11, '%09args+'
         11        INIT_FCALL                                               'implode'
         12        SEND_VAL                                                 '+'
         13        FETCH_DIM_R                                      ~13     !3, 'arguments'
         14        SEND_VAL                                                 ~13
         15        DO_ICALL                                         $14     
         16        CONCAT                                           ~15     ~12, $14
         17        CONCAT                                           ~16     ~15, '%0A'
         18        ASSIGN_OP                                     8          !2, ~16
   40    19      > JMP                                                      ->7
         20    >   FE_FREE                                                  $9
   44    21        CONCAT                                           ~18     'Caught+exception%3A+', !1
         22        CONCAT                                           ~19     ~18, '%0A'
         23        ASSIGN_OP                                     8          !2, ~19
   45    24        FETCH_CONSTANT                                   ~21     'DEBUG_INFO'
         25      > JMPZ                                                     ~21, ->44
   47    26    >   INIT_FCALL                                               'fopen'
         27        SEND_VAL                                                 'redis_multi_log.txt'
         28        SEND_VAL                                                 'a'
         29        DO_ICALL                                         $22     
         30        ASSIGN                                                   !4, $22
   48    31        INIT_FCALL                                               'fwrite'
         32        SEND_VAR                                                 !4
         33        INIT_FCALL                                               'date'
         34        SEND_VAL                                                 'H%3Ai%3As'
         35        DO_ICALL                                         $24     
         36        NOP                                                      
         37        FAST_CONCAT                                      ~25     '%09', !2
         38        CONCAT                                           ~26     $24, ~25
         39        SEND_VAL                                                 ~26
         40        DO_ICALL                                                 
   49    41        INIT_FCALL                                               'fclose'
         42        SEND_VAR                                                 !4
         43        DO_ICALL                                                 
   51    44    >   INIT_FCALL                                               'substr'
         45        INIT_FCALL                                               'trim'
         46        SEND_VAR                                                 !1
         47        DO_ICALL                                         $29     
         48        SEND_VAR                                                 $29
         49        SEND_VAL                                                 0
         50        SEND_VAL                                                 37
         51        DO_ICALL                                         $30     
         52        IS_EQUAL                                                 $30, 'Caught+exception%3A+protocol+error%2C+got'
         53      > JMPZ                                                     ~31, ->55
   52    54    > > EXIT                                                     'bye'
   53    55    >   INIT_METHOD_CALL                                         'rconnect'
         56        DO_FCALL                                      0          
   54    57      > RETURN                                                   null

End of function handle_exception

Function exec:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 2
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 15
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 15
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
Found catch point at position: 22
Branch analysis from position: 22
2 jumps found. (Code = 107) Position 1 = 23, Position 2 = -2
Branch analysis from position: 23
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 30
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
Branch analysis from position: 30
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/NMA2i
function name:  exec
number of ops:  33
compiled vars:  !0 = $i, !1 = $command, !2 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   59     0  E >   ASSIGN                                                   !0, 0
   60     1      > JMP                                                      ->31
   62     2    >   FETCH_OBJ_R                                      ~4      'commands'
          3      > FE_RESET_R                                       $5      ~4, ->15
          4    > > FE_FETCH_R                                               $5, !1, ->15
   64     5    >   FETCH_OBJ_R                                      ~6      'm'
          6        INIT_ARRAY                                       ~7      ~6
          7        FETCH_DIM_R                                      ~8      !1, 'name'
          8        ADD_ARRAY_ELEMENT                                ~7      ~8
          9        INIT_USER_CALL                                0          'call_user_func_array', ~7
         10        FETCH_DIM_R                                      ~9      !1, 'arguments'
         11        SEND_ARRAY                                               ~9
         12        CHECK_UNDEF_ARGS                                         
         13        DO_FCALL                                      0          
   62    14      > JMP                                                      ->4
         15    >   FE_FREE                                                  $5
   68    16        FETCH_OBJ_R                                      ~11     'm'
         17        INIT_METHOD_CALL                                         ~11, 'exec'
         18        DO_FCALL                                      0  $12     
         19      > RETURN                                                   $12
   69    20*       JMP                                                      ->32
         21*       JMP                                                      ->31
   71    22  E > > CATCH                                       last         'Exception'
   72    23    >   INIT_METHOD_CALL                                         'handle_exception'
         24        SEND_VAR                                                 !2
         25        DO_FCALL                                      0          
   73    26        IS_SMALLER                                               !0, 5
         27      > JMPZ                                                     ~14, ->30
   74    28    >   PRE_INC                                                  !0
         29      > JMP                                                      ->31
   76    30    > > EXIT                                                     '5+time+mredis+lug'
   60    31    > > JMPNZ                                                    <true>, ->2
   79    32    > > RETURN                                                   null

End of function exec

End of class RedisMultiErrHandler.

Class Redis_Cache:
Function set_settings:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NMA2i
function name:  set_settings
number of ops:  16
compiled vars:  !0 = $redis, !1 = $ip, !2 = $port, !3 = $timeout
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  102     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      '127.0.0.1'
          2        RECV_INIT                                        !2      '6379'
          3        RECV_INIT                                        !3      0
  104     4        ASSIGN_OBJ                                               'ip'
          5        OP_DATA                                                  !1
  105     6        ASSIGN_OBJ                                               'port'
          7        OP_DATA                                                  !2
  106     8        ASSIGN_OBJ                                               'timeout'
          9        OP_DATA                                                  !3
  107    10        ASSIGN_OBJ                                               'obj'
         11        OP_DATA                                                  !0
  108    12        INIT_METHOD_CALL                                         'rconnect'
         13        SEND_VAR_EX                                              !0
         14        DO_FCALL                                      0          
  109    15      > RETURN                                                   null

End of function set_settings

Function rconnect:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NMA2i
function name:  rconnect
number of ops:  16
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  114     0  E >   FETCH_OBJ_R                                      ~0      'obj'
          1        INIT_METHOD_CALL                                         ~0, 'pconnect'
          2        CHECK_FUNC_ARG                                           
          3        FETCH_OBJ_FUNC_ARG                               $1      'ip'
          4        SEND_FUNC_ARG                                            $1
          5        CHECK_FUNC_ARG                                           
          6        FETCH_OBJ_FUNC_ARG                               $2      'port'
          7        SEND_FUNC_ARG                                            $2
          8        CHECK_FUNC_ARG                                           
          9        FETCH_OBJ_FUNC_ARG                               $3      'timeout'
         10        SEND_FUNC_ARG                                            $3
         11        DO_FCALL                                      0  $4      
         12      > JMPNZ_EX                                         ~5      $4, ->15
         13    > > EXIT                                                     'Error+connecting+redis'
         14*       BOOL                                             ~5      <true>
  115    15    > > RETURN                                                   null

End of function rconnect

Function __call:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 48
Branch analysis from position: 48
2 jumps found. (Code = 44) Position 1 = 49, Position 2 = 8
Branch analysis from position: 49
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 37
Branch analysis from position: 37
2 jumps found. (Code = 107) Position 1 = 38, Position 2 = -2
Branch analysis from position: 38
2 jumps found. (Code = 43) Position 1 = 45, Position 2 = 47
Branch analysis from position: 45
1 jumps found. (Code = 42) Position 1 = 48
Branch analysis from position: 48
Branch analysis from position: 47
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/NMA2i
function name:  __call
number of ops:  50
compiled vars:  !0 = $name, !1 = $arguments, !2 = $i, !3 = $return, !4 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  117     0  E >   RECV                                             !0      
          1        RECV                                             !1      
  119     2        ASSIGN                                                   !2, 0
  120     3        FETCH_DIM_R                                      ~8      !1, 0
          4        FETCH_STATIC_PROP_W          global              $6      'key_request'
          5        ASSIGN_DIM                                               $6
          6        OP_DATA                                                  ~8
  121     7      > JMP                                                      ->48
  124     8    >   INIT_STATIC_METHOD_CALL                                  'j2_timeStamps', 'getInstance'
          9        DO_FCALL                                      0  $9      
         10        INIT_METHOD_CALL                                         $9, 'addCacheTime'
         11        FETCH_DIM_R                                      ~10     !1, 0
         12        CONCAT                                           ~11     ~10, '+%28'
         13        CONCAT                                           ~12     ~11, !0
         14        CONCAT                                           ~13     ~12, '%29'
         15        SEND_VAL_EX                                              ~13
         16        DO_FCALL                                      0          
  125    17        FETCH_OBJ_R                                      ~15     'obj'
         18        INIT_ARRAY                                       ~16     ~15
         19        ADD_ARRAY_ELEMENT                                ~16     !0
         20        INIT_USER_CALL                                0          'call_user_func_array', ~16
         21        SEND_ARRAY                                               !1
         22        CHECK_UNDEF_ARGS                                         
         23        DO_FCALL                                      0  $17     
         24        ASSIGN                                                   !3, $17
  126    25        INIT_STATIC_METHOD_CALL                                  'j2_timeStamps', 'getInstance'
         26        DO_FCALL                                      0  $19     
         27        INIT_METHOD_CALL                                         $19, 'addCacheTime'
         28        FETCH_DIM_R                                      ~20     !1, 0
         29        CONCAT                                           ~21     ~20, '+%28'
         30        CONCAT                                           ~22     ~21, !0
         31        CONCAT                                           ~23     ~22, '%29'
         32        SEND_VAL_EX                                              ~23
         33        DO_FCALL                                      0          
  127    34      > RETURN                                                   !3
  128    35*       JMP                                                      ->49
         36*       JMP                                                      ->48
  130    37  E > > CATCH                                       last         'Exception'
  131    38    >   INIT_METHOD_CALL                                         'handle_exception'
         39        SEND_VAR_EX                                              !4
         40        SEND_VAR_EX                                              !0
         41        SEND_VAR_EX                                              !1
         42        DO_FCALL                                      0          
  132    43        IS_SMALLER                                               !2, 5
         44      > JMPZ                                                     ~26, ->47
  133    45    >   PRE_INC                                                  !2
         46      > JMP                                                      ->48
  135    47    > > EXIT                                                     '5+time+redis+lug'
  121    48    > > JMPNZ                                                    <true>, ->8
  139    49    > > RETURN                                                   null

End of function __call

Function handle_exception:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 37
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 47, Position 2 = 48
Branch analysis from position: 47
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 48
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 37
filename:       /in/NMA2i
function name:  handle_exception
number of ops:  51
compiled vars:  !0 = $e, !1 = $name, !2 = $args, !3 = $err, !4 = $msg, !5 = $handle2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  141     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
  143     3        INIT_METHOD_CALL                                         !0, 'getMessage'
          4        DO_FCALL                                      0  $6      
          5        ASSIGN                                                   !3, $6
  144     6        CONCAT                                           ~8      'Caught+exception%3A+', !3
          7        CONCAT                                           ~9      ~8, '%09call+'
          8        CONCAT                                           ~10     ~9, !1
          9        CONCAT                                           ~11     ~10, '%09args+'
         10        INIT_FCALL                                               'implode'
         11        SEND_VAL                                                 '+'
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                         $12     
         14        CONCAT                                           ~13     ~11, $12
         15        CONCAT                                           ~14     ~13, '%0A'
         16        ASSIGN                                                   !4, ~14
  145    17        FETCH_CONSTANT                                   ~16     'DEBUG_INFO'
         18      > JMPZ                                                     ~16, ->37
  147    19    >   INIT_FCALL                                               'fopen'
         20        SEND_VAL                                                 'redis_log.txt'
         21        SEND_VAL                                                 'a'
         22        DO_ICALL                                         $17     
         23        ASSIGN                                                   !5, $17
  148    24        INIT_FCALL                                               'fwrite'
         25        SEND_VAR                                                 !5
         26        INIT_FCALL                                               'date'
         27        SEND_VAL                                                 'H%3Ai%3As'
         28        DO_ICALL                                         $19     
         29        NOP                                                      
         30        FAST_CONCAT                                      ~20     '%09', !4
         31        CONCAT                                           ~21     $19, ~20
         32        SEND_VAL                                                 ~21
         33        DO_ICALL                                                 
  149    34        INIT_FCALL                                               'fclose'
         35        SEND_VAR                                                 !5
         36        DO_ICALL                                                 
  151    37    >   INIT_FCALL                                               'substr'
         38        INIT_FCALL                                               'trim'
         39        SEND_VAR                                                 !3
         40        DO_ICALL                                         $24     
         41        SEND_VAR                                                 $24
         42        SEND_VAL                                                 0
         43        SEND_VAL                                                 37
         44        DO_ICALL                                         $25     
         45        IS_EQUAL                                                 $25, 'Caught+exception%3A+protocol+error%2C+got'
         46      > JMPZ                                                     ~26, ->48
  152    47    > > EXIT                                                     'bye'
  153    48    >   INIT_METHOD_CALL                                         'rconnect'
         49        DO_FCALL                                      0          
  154    50      > RETURN                                                   null

End of function handle_exception

Function set:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 28
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NMA2i
function name:  set
number of ops:  52
compiled vars:  !0 = $name, !1 = $time, !2 = $data, !3 = $return
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  163     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      null
          2        RECV                                             !2      
  166     3        ISSET_ISEMPTY_CV                                         !1
          4      > JMPZ                                                     ~4, ->28
  168     5    >   INIT_STATIC_METHOD_CALL                                  'j2_timeStamps', 'getInstance'
          6        DO_FCALL                                      0  $5      
          7        INIT_METHOD_CALL                                         $5, 'addCacheTime'
          8        CONCAT                                           ~6      !0, '+%28set%29'
          9        SEND_VAL_EX                                              ~6
         10        DO_FCALL                                      0          
  169    11        FETCH_OBJ_R                                      ~8      'obj'
         12        INIT_METHOD_CALL                                         ~8, 'set'
         13        SEND_VAR_EX                                              !0
         14        INIT_FCALL        

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
182.83 ms | 1436 KiB | 28 Q