3v4l.org

run code in 300+ PHP versions simultaneously
<?php function chinese_date($timestamp, $output_delimiter = ' '){ $info_arr = explode(' ',date('Y m d H i s',strtotime('now'))); return implode($output_delimiter, array_map(function($v,$k){ switch($k){ case '0': // 处理年 return $v.'年'; case '1': // 处理月 return $v; default: // 不做处理的 return $v; break; } }, $info_arr, array_keys($info_arr))); } echo chinese_date('now','*');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kc0JK
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   INIT_FCALL                                               'chinese_date'
          1        SEND_VAL                                                 'now'
          2        SEND_VAL                                                 '%2A'
          3        DO_FCALL                                      0  $0      
          4        ECHO                                                     $0
          5      > RETURN                                                   1

Function chinese_date:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kc0JK
function name:  chinese_date
number of ops:  29
compiled vars:  !0 = $timestamp, !1 = $output_delimiter, !2 = $info_arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      '+'
    3     2        INIT_FCALL                                               'explode'
          3        SEND_VAL                                                 '+'
          4        INIT_FCALL                                               'date'
          5        SEND_VAL                                                 'Y+m+d+H+i+s'
          6        INIT_FCALL                                               'strtotime'
          7        SEND_VAL                                                 'now'
          8        DO_ICALL                                         $3      
          9        SEND_VAR                                                 $3
         10        DO_ICALL                                         $4      
         11        SEND_VAR                                                 $4
         12        DO_ICALL                                         $5      
         13        ASSIGN                                                   !2, $5
    5    14        INIT_FCALL                                               'implode'
         15        SEND_VAR                                                 !1
         16        INIT_FCALL                                               'array_map'
         17        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fkc0JK%3A5%240'
   18    18        SEND_VAL                                                 ~7
         19        SEND_VAR                                                 !2
         20        INIT_FCALL                                               'array_keys'
         21        SEND_VAR                                                 !2
         22        DO_ICALL                                         $8      
         23        SEND_VAR                                                 $8
         24        DO_ICALL                                         $9      
         25        SEND_VAR                                                 $9
         26        DO_ICALL                                         $10     
         27      > RETURN                                                   $10
   19    28*     > RETURN                                                   null

End of function chinese_date

Function %00%7Bclosure%7D%2Fin%2Fkc0JK%3A5%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 4, Position 2 = 7
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 6, Position 2 = 9
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kc0JK
function name:  {closure}
number of ops:  13
compiled vars:  !0 = $v, !1 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    7     2        IS_EQUAL                                                 !1, '0'
          3      > JMPNZ                                                    ~2, ->7
   10     4    >   IS_EQUAL                                                 !1, '1'
          5      > JMPNZ                                                    ~2, ->9
          6    > > JMP                                                      ->10
    9     7    >   CONCAT                                           ~3      !0, '%E5%B9%B4'
          8      > RETURN                                                   ~3
   12     9    > > RETURN                                                   !0
   15    10    > > RETURN                                                   !0
   16    11*       JMP                                                      ->12
   18    12*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Fkc0JK%3A5%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.78 ms | 1403 KiB | 26 Q